ID:179138
 
Ok i want to make it so the grass around you is dense. i tried

for(var/turf/Grass/D in oview(3))
D.density=1
sleep(30)
D.density=0

and it didnt work... so i really have no idea what to do... thanks

~~dbz73~~
NOT a dbz game maker!
dbz73 wrote:
Ok i want to make it so say... the grass around you is dense. i tried

for(var/turf/Grass/D in oview(3))
D.density=1
sleep(30)
D.density=0

and it didnt work... so i really have no idea what to do... thanks

That will work, but it will work one turf at a time--which isn't what you want. I think you want to do this instead:
var/list/grassturfs=oview(3)
var/turf/Grass/D
for(D in grassturfs) D.density=1
sleep(30)
for(D in grassturfs) D.density=0

In your code, only one turf turns dense at a time, for 3 seconds, then another, then another. To change everything at once you need to do that before the sleep. Alternatively you could just spawn() everything off, but that's a really bad idea.

Lummox JR
In response to Lummox JR
Ok i did that and it worked and all... but i decided thats not how i want it to be. How do i make it so a user can not move. like, stop them from being able to move. =) thanks

~~dbz73~~
NOT a dbz game maker!
In response to dbz73
This has been asked alot before, search the forums.