|
Hey, Im animating a character and id like to know if it is possible to have if(Input.GetButtonDown(none)) { //play standing animation } if it is possible or something along those lines that would be very helpful. thank you. preferably JAVA
(comments are locked)
|
|
Actually there is a function called "else" that will do something at all other times when it is not pressed. Ex. (Fill in):
Ex. (All parts):
The object that you attach this script to needs to have an animation component and have the two variables have to have the animation you want to play. You should not encounter any errors from the script. If you need to, you could change the input for a different purpose.
(comments are locked)
|
|
Yes, you would use the "else" keyword. It will be called when the "if" condition is false.
(comments are locked)
|
|
There is also Input.anyKeyDown, which will tell you if any key is pressed on the keyboard, so if(!Input.anyKeyDown) would tell you nothing is pressed. I probably wouldn't use it for this though, the other solutions seem like what you need Thank you that was exactly the answer I wanted :)
Apr 15 at 02:36 PM
IrridiumMonkey
(comments are locked)
|
