- Home /
Question by
Serpentice · Sep 25, 2012 at 02:12 PM ·
ifstatement
How to make an if statement with two conditions?
I thought this was how you were supposed to do it.
if(Input.GetKeyDown(KeyCode.R))&&(!animation.isPlaying) {
GameObject.Find("Soldier").animation.Play("Reload");
PlayReloadAudio();
Reload();
}
I'm having trouble figuring this out. Please help.
Comment
Best Answer
Answer by SolidSnake · Sep 25, 2012 at 02:20 PM
Your brackets seems wrong Simply do this:
if(Input.GetKeyDown(KeyCode.R) && !animation.isPlaying)
{
}
I actually did figure that out before the moderator approved my question but sadly it did not have the end result I wanted. Thanks anyway.
Your answer
Follow this Question
Related Questions
If \ Else how does the program reads it? 2 Answers
|| inside if statement not working. (noob) 3 Answers
Create file in correct directory 3 Answers
if statement help! 2 Answers
How to finish my else if statement? 2 Answers