ID:1704970
 
(See the best response by Kaiochao.)
Code:
Sleep()
set category="Commands"
src<<"<font color=olive><b>You drift to sleep."
src.icon_state="sleeping"
src.Health=100
src.Hunger-=50
src.Thirst-=50
step_size=0
sleep(2000)
src.icon_state="base"
step_size=2


Problem description:

I figured using the step_size code here would work, but it doesn't. Basically, I'm looking for a way to code nullified movement when a player sleeps.

Sleeping restores them to full health but lowers their hunger, and thirst attributes. I just can't figure out how to nullify their movements while sleeping.
Best response
Setting step_size to 0 actually sets it to the world's tile width, according to world.icon_size.

It's not ideal, but it comes from how pixel movement was added on top of tile movement.

If you want to block movement, you need to override one of client.Move() or mob.Move().
In response to Kaiochao
Alright, makes sense. Thanks.
Best way I can think of would be to add a variable to the mob that indicates if it's asleep, then, have your verb toggle it, and override the client's predefined move procs to all check if the client's associated mob has asleep set to 1
In response to PJB3005
PJB3005 wrote:
Best way I can think of would be to add a variable to the mob that indicates if it's asleep, then, have your verb toggle it, and override the client's predefined move procs to all check if the client's associated mob has asleep set to 1

I got it all figured out :) thanks anyways.