ID:262565
 
Code:
f
icon = 'icons.dmi'
icon_state = "6"
Entered(mob/o)
var/a = usr.dir
o.icy = 1
sleep(1)
step(usr,a)
Exited(mob/o)
o.icy = 0


Problem description:this is my code for ice but just seems not to be workin and i get no errors plese help

No put usr in proc. Ungh.

Lummox JR
SummonerHater And Dest Games wrote:
Code:
f
> icon = 'icons.dmi'
> icon_state = "6"
> Entered(mob/o)
> var/a = usr.dir
> o.icy = 1
> sleep(1)
> step(usr,a)
> Exited(mob/o)
> o.icy = 0
>

Problem description:this is my code for ice but just seems not to be workin and i get no errors plese help

Lol, you used usr. No point to that, at all:
    f
icon = 'icons.dmi'
icon_state = "6"
Entered(mob/o)
o.icy = 1
sleep(1)
step(o,o.dir)
Exited(mob/o)
o.icy = 0


Of course, I really can't do much more with the code provided, so this is all I can say: No put usr in proc. Ungh.

You referenced the entering mob with o, so use o continually. Personally, I would probably do a check at the beginning of each Entered and Exited proc with istype(o,/mob), but that's me, and it's probably unnecessary.

Hiead