Suggestion: Extra script functions

Started by Scorpiorus, Fri 14/05/2004 23:02:15

Previous topic - Next topic

Scorpiorus

Let me, If I may, suggest the following script functions:

These to get the number of GUIs, characters and objects:

int GetNumGUIs()
int GetNumCharacters()
int GetNumObjects() // this one has been already suggested I believe


The next listbox function would be very handy to have for changing the text of already added (existing) item. Currently, in order to change a slot we have to clear listbox and add all the items once again:

void ListBoxChangeText(int gui, int object, int item, string text)


Writing to file a single raw char would allow, for example, exporting of palettes (in a raw rgb format) at the run-time:

void FileWriteRawChar(int handle, char value)


We could script an automatic blocking walk-off/walk-on for the player character. And knowing room edges coordinate can be used to determine how far the player needs to be moved when he is walking on from the outside of the screen:

game.edge_top
game.edge_right
game.edge_bottom
game.edge_left

Cheers,
Alex


EDIT: Thanks CJ :)

Pumaman

They all sound like reasonable requests to me, I'll add them to my list.

strazer

Quoteint GetNumCharacters()
int GetNumObjects()

Yeah, these would be great.

For the moment, as a workaround, is there a function I could use to check if an object exists or not?

Pumaman

Currently not -- only a plugin has the ability to do this.

Radiant

As a workaround, you could set a global variable 'number_of_objects' in each room's Enter_Room script.

strazer

That's what I do at the moment and what I would like to avoid.

Gilbert


SMF spam blocked by CleanTalk