|
In my game I have a script that when I hit mouse 0 (left mouse button) I crouch using this script: And now when I hit left mouse button, I crouch, but now I want it so that I crouch and as I am crouching If I move forward I crouch walk (I have that animation) How would I do this? thanks!
(comments are locked)
|
|
Add a toggle that is set to true and test against it. While it might be tempting to nest the if(Input.GetKey("W")) inside the Input.GetKey("mouse 0") rather than creating a new isCrouching variable, just remember you can use the isCrouching elsewhere in the code, and you can also turn it into a toggle later if you want.
Jul 01 '12 at 08:16 PM
Canazza
Thanks but it still doesn't work
Jul 01 '12 at 10:09 PM
Bruno Fludzinski
(comments are locked)
|
