ID:168337
 
turf/Grass
icon = 'grass.dmi'
icon_state = "1"
New()
icon_state = pick(1,2,3,4)
..()


Now... this definatly, definatly doesnt work. I know turfs are never new'd when their already in a map file. But you know what Im trying to do right?

Ideas welcome, just some lil randomisation I wanted to do that i havnt thought through properly :)
Actually new will be called. As for the problem it's very simple.
icon_state = "[pick(1,2,3,4)]"
In response to Fuuhaa
I don't think you need to do that. The problem is that ..() is being called after you set the icon_state. You need to do that before it.
In response to Fuuhaa
I got it like 5 mins ago, I forgot icon state labels are strings and not numbers. Adding a few "'s got it working :)