playMaker

Author Topic: Get Button down trouble!  (Read 3105 times)

mrminico

  • Full Member
  • ***
  • Posts: 129
Get Button down trouble!
« on: September 17, 2016, 05:35:35 AM »
I'm trying to make a jump function, my start state has a GetButton Down and a Set animator bool. Its supposed to only fire once and stay locked on to the next state called "jumped", till grounded bool is true. Now what ends up happening is that when I press the jump button once it doesn't work and goes back to the jump button state. When I double tap it, The state transition works and stays locked on till the character hits the floor. Does anyone have a clue how to control the number of presses get button down fires?
« Last Edit: September 17, 2016, 07:00:11 PM by mrminico »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Get Button down trouble!
« Reply #1 on: September 19, 2016, 11:33:44 AM »
Hi,
Get button down should work the directly when pressed.

As i understand when you press the button it does go to another state?
If so then there is a different issue.

Maybe you can make a quick video showing what is going on and show the state/actions you are using

mrminico

  • Full Member
  • ***
  • Posts: 129
Re: Get Button down trouble!
« Reply #2 on: September 19, 2016, 12:02:02 PM »
I actually solved my issue by adding a wait action in the set velocity 2d state.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Get Button down trouble!
« Reply #3 on: September 19, 2016, 12:16:48 PM »
Hi,
Then maybe you can use a next frame event instead of a wait

mrminico

  • Full Member
  • ***
  • Posts: 129
Re: Get Button down trouble!
« Reply #4 on: September 19, 2016, 06:25:07 PM »
I see I'll try that out  :) I have one more question is it more impactful on performance if lets say I use get axis event twice? I'm still having some what of a hard time getting around in playmaker but so far I LOVE it I'm just on the edge all the time since I want to make a game that performs REALLY well on PC. I just dont know what I should use sometimes.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Get Button down trouble!
« Reply #5 on: September 19, 2016, 07:59:26 PM »
Hi,
Do you mean in the same state or in different fsm?
if you have one for different axis's (horizontal / vertical and or other axis's) in a state then that is fine.
even if you would have 2 of the same it would be ok but not useful.

if you need the axis value you can store the value in a global or you can use "get fsm float"

mrminico

  • Full Member
  • ***
  • Posts: 129
Re: Get Button down trouble!
« Reply #6 on: September 20, 2016, 02:06:01 AM »
I meant in a different state, and thank you again! I really appreciate all the help you've been giving me single handily, you make this forum even more awesome so thanks again! I'll keep posting here incase anyone else has issues the same why I did, That way they can find answers.