Quantcast
Channel: Answers for "Ensuring that a button is released before checking that it's pressed?"
Viewing all articles
Browse latest Browse all 4

Answer by nesis

$
0
0
GetButtonDown() is the way to go. What you're doing is purporting this check on the same frame as when the attack starts... so of course it'll return true! The solution for what you're wanting is to track what stage of the combo the player is up to, and check if GetButtonDown() returns true during that stage. So, make an int that counts the stage the combo is up to. When a combo ends, reset that int to zero. When it continues, increment it. Then in your update method, have a switch statement / if statement to handle different values of the int (ie, different stages).

Viewing all articles
Browse latest Browse all 4

Trending Articles