Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

Enemies not shooting laser on certain level

$
0
0
So in my enemy script, i have where i want the enemy to shoot lasers on certain levels. I got it where it can shoot on level 2, but when it hits like level 3, 4,5,6 and etc. they stop shooting after they get to that level. Here is my script var level: int; var nextShot: float = 0; function Update () { transform.Translate(Vector3(0,-1* speed * Time.deltaTime ,0)); if ( level == 2 && 3 && 5 && 6 && Time.time > nextShot){ Shoot(); nextShot = Time.time + fireRate; } } If yu can help thank you! this has to be so easy and im really confuse why it was not shooting.

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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