playMaker

Author Topic: How to set up a press and release using PlayerInput Actions? [SOLVED]  (Read 790 times)

Adam Z

  • Full Member
  • ***
  • Posts: 207
Hi everyone. So I have two states: Walk and Run. I'd like to be able to press and hold the shift key to run, then release it to walk. What Actions do I use and how to configure it?  I've tried to use 'Player Input Button Events', and it works when assigning "Is Pressed Event" to go to the run state, but how do you use that Action to assign a transition to walk? I tired using "Was Released This Frame", but that doesnt work. Maybe I need to do something in the Input Actions Manager?

Any help would be appreciated!

« Last Edit: September 03, 2021, 02:19:19 PM by Adam Z »

Adam Z

  • Full Member
  • ***
  • Posts: 207
Re: How to set up a press and release using PlayerInput Actions? [SOLVED]
« Reply #1 on: September 03, 2021, 02:24:25 PM »
I figured it out.

Under 'Input Actions' > 'Actions' > 'Run' (in my example), you need to add 'Press' under "Interactions", and then the Trigger Behavor is: 'Press and Release'.

The use the action 'Player Input Button Events', and assign the transitions to "Was Pressed This Frame" and "Was Released This Frame" on corresponding states.

Thats it!


Nnorb87

  • Playmaker Newbie
  • *
  • Posts: 1
Re: How to set up a press and release using PlayerInput Actions? [SOLVED]
« Reply #2 on: September 24, 2021, 07:40:30 AM »
Hi,

i have a question regarding that action (Player Input Button Events).
Do you know maybe what is the difference between 'Is Pressed Event' and 'Was Pressed This Frame'? I just couldn't figure it out.

Btw, i was in the same situation, and it was a tough one for me too :D