Legacy GM How to make the player stop moving and start up again after textbox?

EZTALES

Member
Hey, there quick question,
how would you make a player stop moving when a start moving again after a textbox is finished?
t=regards
EZ
 
I don't know how your player and textbox works, but if you use a state machine for the player object, I would recommend setting the player state to "sleep_state" when the textbox is created and to "idle_state" when the textbox is destroyed.
Otherwise, at the top of the player's step event code:
Code:
// PLAYER'S STEP EVENT
if (instance_exists(o_textbox)) exit;

// REST OF STEP EVENT CODE
...
...
...
 

Rob

Member
You could just use a variable.

Only allow your player to move if "disabled" = false.

When you want to stop the player moving set "disabled" to true.
 

EZTALES

Member
oh and i use drag and drop for the movement of the player
You could just use a variable.

Only allow your player to move if "disabled" = false.

When you want to stop the player moving set "disabled" to true.
that might just work, thanks man!
 
Top