Forum posts

Posted 14 years ago2010-01-02 07:21:56 UTC
in Multiple Headcrabs Post #277208
Hey guys,
So I'm trying to make it so that my new npc, based off of the ncp_zombine.cpp spawns multiple headcrabs (say 5 for example) when the new npc dies.

I looked through the Poison Zombie code and it looks like the headcrabs spawned when the Zombie dies are actually based of the attatchments it already has on it's back, which really isn't of much help.

I tried a few things after looking through some of the other npc files such as npc_baszombie, poison zombie, and the zombine, but I just couldn't find a solution.

All I need is for the amount of spawned headcrabs to be changed from one to five when a zombie is killed (I'm trying to create an NPC whose back explodes when it is killed, and snark like creatures evacuate from the corpse to attack the player).

I'm not really sure how to go about this, although I'm guessing it'll have something to do with headcrabRelease_t in npc_BaseZombie.

Any help on this would be greatly appreciated.
Posted 14 years ago2009-12-27 01:26:30 UTC
in Creating a Custom NPC Post #276949
Come on guys, there must be someone out there who can offer some knowledge on the subject. Imagine how many fellow modders are out there stuck in this situation and asking this exact same question. I know basic programming, and the difference between a class, variable, and function, but the thing is when it comes to coding within a game engine every one is different. Programming a new NPC for HL2 would be different to coding a new NPC into UT3, and vice versa.

I would even go so far as to say I'd be willing to purchase a guide to creating a new NPC for HL2 like the guys at Noesis Interactive did for Mapping and Modeling. Not the modeling, just getting the code for a new character up and running using a model such as the City 17 Citizen as a placeholder. It would go such a long way in helping out the community, and I'm sure it would mean a lot not just to me, but everyone else who needs a helping hand in incorporating their new characters into Half-Life 2.
Posted 14 years ago2009-12-26 08:13:32 UTC
in Creating a Custom NPC Post #276925
Hello everyone.
Now I know that questions surrounding the subject of creating an entirely new NPC have been raised countless times before. I've searched along with many others, through threads on any HL2 editing site to be found. And yet there seems to be no walk through guide to help any of us out who are new to programming and modding.

So what I'm asking is, does anyone know of any guide out there that walks you through the process of creating a new NPC for a HL2 Mod? I've checked out the NPC tutorials on the Valve Developer Community (http://developer.valvesoftware.com/wiki/Creating_an_NPC) but the directions there seem vague and difficult to understand for someone who has only just started out with programming.

If a guide detailing the steps to create an NPC from the ground up does not yet exist, would it be possible for someone who has experience with such a topic to kindly take the time to write up such an article. It doesn't have to be complicated, maybe something as simple as getting a character to walk around in game.

I know this is a big ask, but I can safely say that not only would a tutorial covering the creation of an NPC benefit myself, but it would greatly benefit the rest of the modding community. Surely someone out there would be kind enough to share their knowledge on the subject.

Regaurds
-Clayton.