- Home /
Asking for code
Walking using 2 buttons alternately
Hi, how do I make the character walking using 2 button, like 'A' and 'S' alternately, instead using just single button to move forward? You know, kinda like when we walk, right and left? Is that possible? Thanks in advance.
To sum up, asking "how do I make" questions is not how you solve problems.
This website is here to do one thing: help you solve your Unity specific problems.
This website is not here to:
Educate you. The only $$anonymous$$ching here is pointing towards other resources (if that). If you don't even understand software development, then why are you here asking about it?
Solve your problems for you. If you want someone to do that for you, hire them. You don't go around the streets asking people to build your shed for you, so why do it on the internet?
that's not a unity specific question. it depends if you have 2 legs to move or just a solid movemnt, just assign a and s to alternatively advance the player by n amount, linear or click speed relative amount.
Answer by Andres-Fernandez · Oct 03, 2014 at 07:00 AM
First, I believe this is a design question and should go into the forums.
Second, if you ask whether it's possible or not it sounds like you haven't even tried anything. Someone should play the What have you tried? card.
Third, yes. It is possible and can be easily achieved by using a simple state machine with an enum or even a couple booleans.