client
//Handlers for when a player is stunned or something.
North()
if(mob.block_movement)
return 0
..()
South()
if(mob.block_movement)
return 0
..()
East()
if(mob.block_movement)
return 0
..()
West()
if(mob.block_movement)
return 0
..()
Problem description:
I've been trying to figure out how to override movement so that when called from somewhere else. With the code above, movement is successfully "blocked". But what other ways can you move a player on the map?
(I tried Move(), but it kept throwing me errors or I just don't know how to use it properly)
To provide an example of what I am trying to accomplish, let's say an enemy grabs you and moves you around. While the enemy is moving, you are also moving with the enemy. You can't control your character until the enemy lets you go.
Here's how your code would probably be done in client/Move():
*It's important to preserve the return value of built-in procs that return a value by default (check the DM Reference for what built-in return values for any proc would be, if any).
The player's mob can be moved using any movement proc, such as walk(), step(), or Move(). In your example, you should do this when the controlling mob moves.
Moving the mob manually doesn't go through client/Move() because the player isn't directly causing the movement.