Naming objects on the fly

Started by Slasher, Thu 10/12/2020 11:18:33

Previous topic - Next topic

Slasher

Hi

I have empty object food containers that can be filled with food. There are a number of food items to choose from. As each container is filled it goes to the top of the screen...

I need each container to set the description of the food inside... which of course could be any of the food items..

Can you help?

Cheers

Crimson Wizard

#1
Custom Properties is the only way at the moment, as AGS does not support changing object's name (description) at runtime.

Setup a custom proper schema in the editor, create a String property, call it as you like, and mark it as applied to Objects (or other types if you need).

Then in script you can use GetTextProperty and SetTextProperty to get/set your custom value.

Slasher

Thank you Crimson...

Another inst to add to your list of TODO's  (laugh)

Cheers

SMF spam blocked by CleanTalk