playMaker

Author Topic: How to disable WASD with trigger (begginer.)  (Read 544 times)

ChristmasHouse

  • Playmaker Newbie
  • *
  • Posts: 2
How to disable WASD with trigger (begginer.)
« on: February 19, 2021, 02:49:26 PM »
Hey, I'm a beginner. I'm trying to build a scene where the character (first-person,) has a dialogue exchange with an NPC. When the character enters the trigger zone the NPC initiates the dialogue. When the character enters the trigger zone I want WASD movement controls disabled for the duration of the dialogue. and when the dialogue is over I want WASD to reactive, of course. Can someone explain how to do this? Both deactivating/reactivating. All help is sincerely appreciated.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: How to disable WASD with trigger (begginer.)
« Reply #1 on: February 19, 2021, 03:29:33 PM »
Hi.
There are a few ways.

For example you can use Enable Fsm and disable the controller fsm, then enable when dialogue is done.

If to controls are on Player, you could set a Global Variable 'Player' and on start you can use 'Set Game Object' to place the player object into the variable.
This way its easier to reference.

Instead of disabling/enabling the fsm, you can also use events.

set a event to a empty state to disable and one to the controls to enable.