|
I am trying to destroy an object at the start of a specific wave. I currently have an on screen gui that keeps track of each wave and a spawn controller that tells the gui what wave it is with the var currentWave. I am using the gui script to destroy the object. This is the script. I keep getting an error saying "Assets/Scripts/WaveManager.js(8,16): BCE0044: expecting ), found '='. " and Assets/Scripts/WaveManager.js(8,18): BCE0043: Unexpected token: 4. What do I need to change if(currentWave = 4) to in order to make this work?
(comments are locked)
|
|
Note that = means assignment of value and == compares variables. In your case you need to use == to compare the values. Another bug is that you should remove the semi-colon in the if statement I new it had to be something trivial I was overlooking. Many thanks.
Aug 27 '11 at 06:23 PM
Ajaxx84
(comments are locked)
|
