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

Enemy attacks player but only once

$
0
0
So I have an enemy that chases the player and attacks it once it interacts with the player's collider, but the enemy only attacks it a single time. I want it to attack the player multiple times until the player dies. I was thinking I should have the collision detection on the update method, but I'm not sure how to do it. Please, any help is appreciated. I've attached a PNG file of my script:![alt text][1] [1]: /storage/temp/182750-help-ref.png

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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