How to make npcs visible in editor again Created 8 years ago2016-01-17 15:59:48 UTC by 23-down 23-down

Created 8 years ago2016-01-17 15:59:48 UTC by 23-down 23-down

Posted 8 years ago2016-01-17 16:00:17 UTC Post #328324
Hi the headline says it all.

How can I make additional npcs visible in the Hammer Editor?
I knew once how it works. In the game .fgd but I can't remember how I did it and what I had to change..

Does anyone know that?

Greetings 23-down
Posted 8 years ago2016-01-17 16:59:44 UTC Post #328325
At it's simplest, you just have to add a single line.
Say you have a monster_potato. You'd use code like this:
@PointClass base(Monster) size(-16 -16 0, 16 16 72) studio("models/potato.mdl") = monster_potato : "monster_potato" []
If your NPC has configuration options or semi-unique flags, though, you'll want to base it off the FGD Data of the closest NPC.
For example, say you have a monster_human_gunner based off the Hgrunt code, but it has an extra gun and a new model -
[quote]@PointClass base(Monster) size(-16 -16 0, 16 16 72) studio("models/hgunner.mdl") = monster_human_gunner : "monster_human_gunner"
[
netname(string) : "Squad Name"
spawnflags(Flags) =
[
	//* Only needed if you use the Squad Name value. If you define a Squad using the Squad Name
	//* value, but none of them are flagged as a Squad Leader, then the squad won't get linked
	//* together properly.
	32 : "SquadLeader" : 0
	//NEW 0.3
	//* Ensure the player can't take this monster's ammo or weapons.
	1024: "Don't Drop Gun" : 0
]
weapons(Choices) : "Weapons" : 1 =
[
	1 : "9mmAR"
	3 : "9mmAR + HG"
	5 : "9mmAR + GL"
	8 : "Shotgun"
	10: "Shotgun + HG"
11: "Human Gunner Gun"
]
][/quote]

There's also the sequences stuff for model support, which is just listing the animations of the model by number and name - Though it's fairly self-explanatory once you find an example block of code.

It's probably also worth noting that I grabbed this from a Spirit FGD - The Don't drop gun flag isn't going to work in base HL or your mod, unless it's based off spirit.
Notewell NotewellGIASFELFEBREHBER
Posted 8 years ago2016-01-19 21:03:45 UTC Post #328390
Thanks Jeffmod... That did the trick.. :)
You must be logged in to post a response.