• Custom NPC
    2 replies, posted
Hello, I have tried looking everywhere for an answer to these two questions; how do you give a npc custom sounds and how can you change what name appears near the kill icon on the top right corner of the screen? To clarify the first question a little bit, how can you give a specific custom made npc its own death sound so that he doesn't die with a female citizens death sound. As for the second question, how can you get this to appear, "DrPepper715 (Kill Icon) MW2 Soldier" instead of this, "DrPepper715 (Kill Icon) Citizen" Hope what I posted above is somewhat lucid. Thanks in advance.
*Bump
In the folder containing the NPC, (where the shared.lua is) make a file called "cl_init.lua" and paste: [code] include('shared.lua') ENT.RenderGroup = RENDERGROUP_BOTH function ENT:Draw() self.Entity:DrawModel() end language.Add("npc_name", "MW2 Soldier")[/code] Replace "npc_name" with the name of the NPC (npc_***) EDIT: Also to add a deathsound (in particular) Add to the file (anywhere, preferably somewhere near the top) [code] ENT.Death("path/of/sound.wav")[/code] Then at the bottom, add in (if it's not already present) [code] function ENT:OnKilled( dmginfo ) self:EmitSound(self.Death) self:BecomeRagdoll( dmginfo ) end[/code]
Sorry, you need to Log In to post a reply to this thread.