ID:145255
 
Code:
mob/var
canmove = 1

mob/proc
LockMovement()
canmove = 0
UnlockMovement()
canmove = 1

mob/
Move()
if(canmove == 0)
return
else
..()


Problem description:
Not so much a "problem" as a "doesn't do what i want!". I want to make sure that the player can't move while I'm doing cutscenes, so they can't mess it up. BUT the cutscenes tend to involve me using the step() proc. The above code "cancels" that out.

Is there any way I can make sure that JUST client-side movement gets prevented? (if that makes sense)

Please and thank yous ^_^;;
Changing their x,y,z and dir
In response to Mysame
..i never thought of that..thanks ^_^; (such a simple solution, should've worked that out alone >_<)
In response to Mysame
Mysame wrote:
Changing their x,y,z and dir

Inefficent. A better way would be to use client/Move() rather than mob/Move(). The difference is is that client/Move() gets called when the commands .north, .south, .east and .west are called. Normally these are referred to as the arrow keys, but I use their code-names to screen out any smartasses who come on with "but if their macros are set different...".

mob/var
canmove=1

mob/proc
LockMovement()canmove=0 //inefficent
UnlockMovement()canmove=1 //inefficent
ToggleMovement() //somewhat more efficent
canmove=!canmove //toggle the canmove var between 0 and 1 (TRUE / FALSE)
.=canmove //set the return value to the new canmove var; this will auto-return the canmove var, but will also take into consideration variable changes

client
Move()
if(!mob.canmove)return 0 //return 0 if the mob can't move
return ..() //otherwise do default

Something like that should suffice. Please, don't use two procs for setting a variable. In fact, don't even use my ToggleMovement proc; just set it to 0 or 1 manually!

01000100011000010111010001100001