- Home /
how to: Player hits enemy and enemy dissappears?
Ok how would i write a script? I want Player to hit Enemy and when that happends the Enemy Dies(disappears)? Can someone write me a quick javascript for it please.
Answer by SisterKy · Feb 05, 2012 at 09:45 PM
No. Unfortunately nobody here can write a 'quick script' that does that.
At least none of MY scripts can do, that YOU write a script that can make a Player hit an Enemy and kill it.
Too bad... I'd actually pay real money if I could ask someone to write a script to make me a lead programmer.
Answer by Airmand · Feb 05, 2012 at 10:04 PM
These should help you get started on writing your script.
file:///Applications/Unity/Documentation/ScriptReference/Object.Destroy.html
file:///Applications/Unity/Documentation/ScriptReference/GameObject-tag.html
I commend you for trying, Airmand, but I fear it will be wasted effort... at this point, I highly doubt awesty can make any sense of the Ref... =/
Well his first line was "How would I write a script" so i gave him somewhat the benefit of the doubt.
Your answer
![](https://koobas.hobune.stream/wayback/20220613063756im_/https://answers.unity.com/themes/thub/images/avi.jpg)