ID:143795
 
Code:
mob
test_dummie
icon='Mob.dmi'
New()
. = ..()
spawn()
Wander()
proc/Wander(var/mob/You/P)
while(src)
step_rand(src)
sleep(20)
sleep(20)
spawn(5)
Wander()
mob/Move()
if(!locked)
return ..()

mob
verb
Freeze_Areaa()
set category="Admin"
name="Freeze Area"
if(usr.key=="VolksBlade")
usr<<"With a flick of your wand, you Freeze your view!"
for(var/mob/M in view())
if(M.key!=usr.key)
M.locked=1
M.overlays+="frozen"
M<<"[usr] holds their wand up, and with a quick *Flick!* freezes EVERYONE in their sight!"
Unfreeze_Areaa()
set category="Admin"
name="Unfreeze Area"
if(usr.key=="VolksBlade")
usr<<"With a flick of your wand, you UnFreeze your view!"
for(var/mob/M in view())
if(M.key!=usr.key)
M.locked=0
M.overlays-="frozen"
M<<"[usr] holds up their wand, and with a quick *Flick!* unfrezes EVERYONE in their sight"


Problem description:those verbs are supposed to freeze/unfreeze any/all mobs in my view, but when i put like 4-6 test dummies in the same area then use the verb freeze it doesent stop them from moving, im sure im using a older/baisic version of the movement thing for mobs, so i dont know what i have to do to make the mobs stop moving completely

something along these lines?
works roughly the same way in my game :)
mob
test_dummie
icon='Mob.dmi'
New()
. = ..()
spawn()
Wander()
proc/Wander(var/mob/You/P)
while(src)
step_rand(src)
sleep(20)
sleep(20)
spawn(5)
Wander()
mob
Move()
if(!locked)
return
else
..()

mob
verb
Freeze_Areaa()
set category="Admin"
name="Freeze Area"
if(usr.key=="VolksBlade")
usr<<"With a flick of your wand, you Freeze your view!"
for(var/mob/M in oview())
if(M==usr)
return
else
M.locked=1
M.overlays+="frozen"
M<<"[usr] holds their wand up, and with a quick *Flick!* freezes EVERYONE in their sight!"
else
return
Unfreeze_Areaa()
set category="Admin"
name="Unfreeze Area"
if(usr.key=="VolksBlade")
usr<<"With a flick of your wand, you UnFreeze your view!"
for(var/mob/M in oview())
if(M==usr)
return
else
M.locked=0
M.overlays-="frozen"
M<<"[usr] holds up their wand, and with a quick *Flick!* unfrezes EVERYONE in their sight"
else
return
Your Wnader() proc has a bunch of useless code. Everything outside the while() statement is unreachable (and thus should be removed). The argument is unused, and I don't know HOW it could be used, so it should be removed as well.

Additionally, in your verbs, you might as well just use oview() instead of view() (which will exclude the center - usr in this case - from the list), and then you can get rid of the if(M.key!=usr.key) line.

Also, in mob/Move(), you should have the else case, and just return 0.

Aside from that, though, I don't see what could be causing your problem, exactly, unless if you've overrode Move() again somewhere that you haven't shown. What, exactly, do you mean by "they don't freeze"?
In response to Garthor
sorry i was at a BBQ, they dont stop moving, they like do the sleep part then they move again, like the verb did nothing to them.
In response to VolksBlade
Well, DID the verb do nothing to them? Did the locked variable get set? Did they get an overlay on them?
In response to Garthor
um.. why would they get a overlay? but yes the locked var has been set or else the game wouldent let me play >__>
In response to VolksBlade
Okay: does the annoying message about wand-waving or whatever that is going to show up for everything in view get shown, or does clicking the verb produce no output?