Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

If statement not working

$
0
0
Hello, I'm having trouble getting my if statements to start. if(Wave1 > 0) { Debug.Log("Check"); } Here I want it when Wave1 is set to the value of 1, it will Debug.Log("Check"); function OnTriggerEnter () { SurvivalScript.Wave1 += 1; } This is a different script which will add 1 to the Wave1 value. I want it so it adds 1 to the value when you enter the trigger, then logs ("Check"). Wave1 is a static int and I'm getting no scripting errors, yet I'm getting nothing in the console. Please help me, Thanks.

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>