Playmaker Forum

PlayMaker News => General Discussion => Topic started by: mrminico on September 17, 2016, 05:35:35 AM

Title: Get Button down trouble!
Post by: mrminico 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?
Title: Re: Get Button down trouble!
Post by: djaydino 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
Title: Re: Get Button down trouble!
Post by: mrminico on September 19, 2016, 12:02:02 PM
I actually solved my issue by adding a wait action in the set velocity 2d state.
Title: Re: Get Button down trouble!
Post by: djaydino on September 19, 2016, 12:16:48 PM
Hi,
Then maybe you can use a next frame event instead of a wait
Title: Re: Get Button down trouble!
Post by: mrminico 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.
Title: Re: Get Button down trouble!
Post by: djaydino 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"
Title: Re: Get Button down trouble!
Post by: mrminico 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.