• NPC Custom HP Not Working
    5 replies, posted
So I've downloaded a bunch of NPCs for GMod 13, and when I go into the LUA files I noticed that they all have custom health values. The only problem is that when I spawn them ingame, they spawn with the standard amount of 40-50 hp instead of the 100-200 that they are supposed to spawn with. Is this an issue with the new GMod 13, or is it something else entirely? I've looked around the web but I haven't been able to find anything...
Post the lua file for the NPC's. Wrap it in lua tags.
[QUOTE=Tenpenny;43432220]Post the lua file for the NPC's. Wrap it in lua tags.[/QUOTE] [code]local Category = "Metroid" local NPC = { Name = "Samus", Class = "npc_citizen", KeyValues = { citizentype = 4 }, Model = "models/smashbros/samlyx.mdl", Health = "250", Category = Category } list.Set( "NPC", "npc_Samus", NPC ) [/code] This is an example of one of the NPCs I downloaded. Based on the tutorials I managed to find, this should give Gmod the info it needs to script an NPC. I'm still new to LUA scripting, so I'm still trying to wrap my head around it.... Did you want the full file itself?
bump
I don't think that functionality still works, maybe make a custom NPC instead?
I'm not sure how Gmod 13 reads the code anymore. I might try using ConVars to set the hp... but I haven't gotten around to it yet... Everything seems to work aside from the health and that it seems to spawn female custom NPCs with male models and vice-versa...
Sorry, you need to Log In to post a reply to this thread.