Lol
idk, this is how i'd go about it.
turf |
Kozuma, you should really be using findtext, not copytext there. Copytext is a lot slower because it has to generate a new string, and THEN you compare it. Also, you should be checking list and list.len.
An alternative, since icon_states() can be very slow depending on how many states the icon contains - you can simply add your randomized turfs as direction frames, but that only allows a maximum of 8 forms. simply: turf.dir = pick(NORTH, SOUTH, EAST, WEST, NORTHEAST,\ |
Super Saiyan X wrote:
Also, you should be checking list and list.len.I do with if(list) An alternative, since icon_states() can be very slow depending on how many states the icon contains - you can simply add your randomized turfs as direction frames, but that only allows a maximum of 8 forms. That works too ^^ |
Kozuma3 wrote:
Super Saiyan X wrote: if(list) only checks if the list object exists. Not if it has contents. If it has no contents after your loop removes all the strings, it'll set the icon_state to blank, which might not be desired behavior. |
I find my way of doing it more simplistic xD.