how do I set objects icon_state to a randomly selected one?
when they are created (New())
ID:180637
![]() Apr 22 2001, 8:20 am
|
|
I found a better way :)
the obj in question is an asteroid with 10 different states named 1-10. I use this: New() icon_state = num2text(roll(10)) it works, but only when the icon_states names are numbers. but that is probably the only time I want random states |
Right now there is no programmatic way to know what the icon states are.
So you need to create a list of the icon states for an object, then use pick() to select one randomly.