Stopping button mashing???
Im working on a fighting game and just can't seem to get it to do 1 thing at a time. Right now i have square and x are kicks. Triangle and square are punch. But if i press x and square simultaneously he does both animations/ attacks, I don't want that. I just want one input at a time????
-
Pass each button through an exclusive gate. These will only allow one signal through at a time (Out of any gates that share the same name).
-
Another method would be to put the controls through their own pass-through nodes. Then in the timeline of each animation, add a keyframe that lasts the whole duration that turns off those nodes. So while an animation is playing, the controls that would trigger an animation are effectively switched off.
-
I think the simplest way to do this would be to use the selector, I think the selector guarantees only 1 output at a time, but I might be wrong
-
'@giant585dark, the selector does indeed only let one input through, but any successive presses will override the previous signal through. That is to say, if you mash 2 buttons at the same time, one will win by fractions of a second, then quickly be overridden by the other. So both pass through.
-
cgCody and TAPgiles i pretty much combined both your ideas lol. I used some exclusive gates on the attacks and also i put the controls through nodes . It's working pretty great at the moment. Greatly appreciated thnx
-
What I would do is program cooldowns/recoveries, so as part of a punching animation playing, no only do you have to be pressing triangle, you also have to not be kicking or using the other punch. A way to do this would be putting a tag labeled busy or something similar on the timeline that plays the punching animation. Have it so that for any kick or punch, the button must be pressed and the busy tag must not be detected. This is what I was able to find out with my limited knowledge.
댓글을 남기려면 로그인하세요.