Hi, I am developing a FPS game where enemies come chasing after you.
I am having trouble developing a system where when the enemies come into contact with me, my health decreases.
Can someone kindly help me with the scripting how to do this, and how do I setup a GUI display for my health as well.
Thank you very much.
asked Dec 05 '10 at 01:18 PM
Get distance using
Check IF the distance is less than 1, than destroy the enemy chasing...
ELSE, keep chasing.
I'd separate the GUI question, but their are tutorials on it. Check this guy out: http://www.burgzergarcade.com/search/node/health
answered Dec 05 '10 at 03:07 PM
In my game I have a large monster that attacks with melee attacks. During melee attacks I create a box collider object around the monster's claw (the object is a child of the claw's bone). If the collider hits the player I have it deal damage and then destroy itself to avoid doing repeat damage. The collider also has a timer to destroy itself when the attack is over.
answered Apr 29 '11 at 01:36 AM
Richard J. Hansen
you will have to add custom logic for what to do when your health reaches 0 of course.