- Home /
Killable NPC who can kill player
I have learned the basics to C# scripting. These include; Variable, Strings, Arrays, Conditions, Operators and Loops. I need to make an NPC which can take damage from weapons and can cause damage to the player. Which of the basic skills would I need to use to do this? Is there anything else I need to know to do this?
Answer by Montraydavis · Nov 01, 2012 at 04:15 PM
I have a fully working script available on another answer here !
[JS. Convert to CS if you need] Just apply those scripts to the NPC, remove the animations like walking, attack, or whatever fits your NPC's needs, and you will be on your way . Please do keep in mind that you will need to do some tweaking, but, essentially, it's no different than an Enemy. They are all entities.
URLS-- Motor: http://pastebin.com/DczwH38D
Intelligence: http://pastebin.com/6WfhS8q7
Animator+Controller: http://pastebin.com/n0bSFXen
You are welcome. Please mark as answered, and / or thumbs up to verify this solves your issue ! :) Thanks for using Unity3D .