- Home /
Enemy killing help
hey unity users i need help with my scripting. right now i have a axe and when you right click a animation goes once then stops. but now i want the axe to inflect damage on the in game robot. but i cant seem to do that anyone have any ideas for a script. if you have any questions please just ask.
thanks skully42
Answer by xylax · Feb 08, 2012 at 06:07 AM
Try to attach a colider to the axe and upon OnTriggerEnter decrement a public int of that gameobject's "health".
hey thanks your idea most likely will work but i am new to scripting and was hoping for a script and the script will have if the gameobject gets close to the emeney(you can adjust the distance)the enemy will lose health
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Sound script problem. 0 Answers
Mouse Aiming Follow Wrong Direction - Help 2 Answers
Editing the standard FPS to work different 0 Answers
Items with Statistics(such as attack damage) that actually effect the character? 2 Answers