Freeze my character?

Hello. I want to make my character freeze when dialogue is occurring with another player, but I’m not exactly sure how to implement that into my current code without messing something else up or cancelling out the current code. Does anyone know?

What do you mean by freeze? How is the player moving at the moment?

Also, your change scene to printer room won’t create John in the printer room scene. Once you call change scene, all current scene objects are removed and any events after it won’t be actioned.

Wait, really? Thank you for letting me know! I’ll change the printer room action in a minute. And I want John to stop moving until the dialogue is finished, so that way the player can’t move. He moves currently though the left and right arrow keys and the ‘space’ key is used to make John interact with things.

Not through a behaviour? In that case, in the event conditions that check which arrow key is pressed add an additional condition that checks the dialogue is not in progress (invert the dialogue is running condition).

Or better coding practice would be to have an event that checks that dialogue is not in progress, and then have the arrow key press checks as subevents.

Oh wait, I’m sorry. He does move through behavior. When I said arrow keys, I meant that what’s changes John’s animation.

Ok, then turn off the behaviour when the dialogue starts, and turn it back on when the dialogue has finished. And still have those dialogue is not running conditions when you check the arrow key presses.

You may still have to do the dialogue is running condition with the spacebar pressed event.

Ohhh okay. Thank you! I’m going to try that right now. Also I have one more problem now that I’ve completed more coding…the options won’t appear in the text box and I’m not sure how to fix the issue.
The screenshot provides the text that relates to the dialogue in its entirety. Or I could share the game file itself if that would be easier.

I haven’t played round with yarn, so I’m not familiar with it yet. But maybe someone who is can help here.

1 Like