Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Scorpiorus on Fri 14/05/2004 23:02:15

Title: Suggestion: Extra script functions
Post by: Scorpiorus on Fri 14/05/2004 23:02:15
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 :)
Title: Re: Suggestion: Extra script functions
Post by: Pumaman on Fri 14/05/2004 23:18:24
They all sound like reasonable requests to me, I'll add them to my list.
Title: Re: Suggestion: Extra script functions
Post by: strazer on Thu 03/06/2004 21:06:11
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?
Title: Re: Suggestion: Extra script functions
Post by: Pumaman on Thu 03/06/2004 23:00:00
Currently not -- only a plugin has the ability to do this.
Title: Re: Suggestion: Extra script functions
Post by: Radiant on Fri 04/06/2004 10:12:04
As a workaround, you could set a global variable 'number_of_objects' in each room's Enter_Room script.
Title: Re: Suggestion: Extra script functions
Post by: strazer on Fri 04/06/2004 10:55:18
That's what I do at the moment and what I would like to avoid.
Title: Re: Suggestion: Extra script functions
Post by: Gilbert on Fri 04/06/2004 11:16:04
Or use custom room properties.