Lol
1
2
In response to Zasif
|
|
idk, this is how i'd go about it.
turf |
In response to Kozuma3
|
|
Okay everyone, look at this skill. This is A+ code right there.
|
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,\ |
In response to Super Saiyan X
|
|
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 ^^ |
In response to Kozuma3
|
|
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. |
In response to Super Saiyan X
|
|
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. Ah, fixed ^^ |
1
2
I find my way of doing it more simplistic xD.