Welcome to ValveTime

The number one place on the internet for Valve game discussion, news, and a community full of the best Valve fans.

Super happy NPC spawning guide

Discussion in 'Half-Life' started by MagicalMonkey, Nov 27, 2004.

Thread Status:
Not open for further replies.
  1. ilovemetal

    ilovemetal Newbie

    dude i tried binding a npc creat with weapon to a key but it didnt work can someone help me... like this npc_create_equipment weapon_shotgun; wait; npc_create npc_alyx but binded to a key
  2. madcat75

    madcat75 Newbie

    npc_create_equipment weapon_shotgun; wait; npc_create npc_alyx

    try that
  3. madcat75

    madcat75 Newbie

    Has anyone figured out how to change the skin when spawning a citizen? Like giving him / her the medic skin?
  4. madcat75

    madcat75 Newbie

    well, guess this thread is compleltley dead. :(
  5. can you make dog attack?
  6. madcat75

    madcat75 Newbie

    I'm sure there's a way but I dont think anyone on this forum knows :flame:
  7. Biggleska

    Biggleska Newbie

    Gone from sticky?
  8. madcat75

    madcat75 Newbie

    Guess so :frown:
  9. Death Spike

    Death Spike Newbie

    Does anyone know how to make npcs like alyx follow you? All they do is stand in pne place.
  10. madcat75

    madcat75 Newbie

    I'd like to know also. Did anyone figure out how to specifiy a skin when spawning a citizen? Like giving em the medic skin?
  11. madcat75

    madcat75 Newbie

  12. madcat75

    madcat75 Newbie

    liek, bump
  13. Don't know if this has been asked before (I'm lazy) but is there a way to spawn crab and mortar synth's??
  14. i don't think there's a way to spawn those. BUMP, greatest topic ever. almost. Well it's pretty darn good anyway. Okay, better than average. It's definetly not a steaming pile of shit.
  15. madcat75

    madcat75 Newbie

    anyone know how to get DOG to attack when you spawn him?
  16. I don't think DOG can attack when one spawns him. Would be kickass though.
  17. No way! mine's better!

    ...well ok, it isn't, but check it out anyway! :cheese:
  18. Notes

    Notes Guest

    Dog doesn't look like he ever does any "actual" fighting.. it's all just script stuff, so there probably -is- no AI to handle him in a fight..

    Just a thought..

    I did learn some cool stuff from this thread, though, thanks peoples.. :)

    Cheers
  19. DaedalusXP

    DaedalusXP Guest

    Can you tell me how to work with setrelationship?

    I don't have any idea how to change sides on NPCs! I've tried everything!
  20. Sid Burn

    Sid Burn Newbie

    Hmm... I think you can also spawn the mighty Ichthyosaur and the weak Stalker.
  21. Notes

    Notes Guest

    Someone can correct me if I'm wrong, but you appear to set the relationships in the quoted format, such as, relationsip to what (player), what the relationship is (D_HT = hate) and the priority, bigger number, higher priority.. that's at least how the source code works, so I assume the console input matches. Seems to be from the little messing around I've done..
    Relationships from the code are:

    Code:
    enum Disposition_t 
    {
    	D_ER,		// Undefined - error
    	D_HT,		// Hate
    	D_FR,		// Fear
    	D_LI,		// Like
    	D_NU		// Neutral
    };
    Classes have default relationships, and 'most everything fits fairly nicely into classes.. they're all defined in hl2_gamerules.cpp if you want to look.. here's one:

    Code:
    CBaseCombatCharacter::SetDefaultRelationship(CLASS_MISSILE,	 CLASS_PLAYER,	D_HT, 0);
    Hmm.. the Missles hate you..

    What would be nice, if you could simply change the class of an entity, but I haven't seen a way.. maybe it's not possible, but it'd be cool if you could change something that's CLASS_ZOMBIE to CLASS_PLAYER_ALLY with a simple command. ;)

    Cheers
  22. Notes

    Notes Guest

    Sorry.. curious.. I thought I read the original post to this the other day, but maybe I was dreaming.. I can't seem to find it now.. what's up with that?

    Are there any other outstanding issues..? Like.. well, I'm working on making friendly turrets.. already done with a mod, but should be do-able without a mod. (mod curtesy of qckbeam on this board)

    Just messin' around and looking for things to do.. HL2 IS an awesome release, and the SDK just shows how generous those people really are.. so I'm just having fun..

    Cheers
  23. Elkhound

    Elkhound Newbie

    I still havnt seen an answer on the question "can you make alyx or somebody else follow you?" Would somebody please answer...
  24. xdiesp

    xdiesp Newbie

    hi madcat! I've done something very similar to your guide in italian,and then proceeded applying step by step all I knew in a mod I am making. Wonderful work for having solved the set_releationship dilemma! I really can add some enemy vortigaunts now,and innocuos striders whose gun I couldn't turn off. Next on my agenda,now,is seeing if the skin names in Model Viewer are the right imput for the skin command. I guess that by this time you already know how to spawn the armed airboat. And that finding and deleting the triggers with the kill imput makes the sea surfable with no instant death. But do you know how to customize the output level of a changelevel entity you encounter at end stage? I'm stuck at ent_fire name addoutput,I don't know what to write then.
  25. xdiesp

    xdiesp Newbie

    2 things more. To spawn a mortar synth one could switch its model with the one on an unused,or used very rarely object in the game. Then you would see it standing there,just for show. The problem is: which object would you use? I have to try again all those unworking pre-release weapons... Also,do you know the imput that specifies friendly fire,if there is one?
  26. loquer

    loquer Guest

    good guide, thanks! :)

    does anyone know how to spawn a turret and make it shoot at the enemys, and a bit more weight too?
  27. Notes

    Notes Guest

    Well, in Nova Prospect, where you have 3 turrets, you can spawn turrets, and then set them to "npc_combine_s D_HT 9" (or something similar) and they -will- attack the combine that come.. and if you also set them to something like "player D_LI 99" they -won't- attack you..

    but.. once you set them to "npc_combine_s D_HT x" they also hate each other, and will start shoothing at each other if they see others of themselves. :-/

    I had about 45 or so all laid out waiting for the combine.. and.. it worked.. but when one got knocked a bit, it would see the ones next to it, and start shooting them, usually knocking a couple more over.

    In the end, I still had more than about half standing.. but.. when Alyx came.. THEY KILLED HER! Game over. "You let Alyx die." ;)
    (Oops.. guess I shoulda told 'em to like Alyx too..)

    Still playing with it.. there has to be a way.. (ok, maybe not, but I think there should be, so.. y'know..)

    about the weight.. not sure, but I'll have a look..

    Cheers
  28. Notes

    Notes Guest

    Specifies friendly fire where, to what..?
  29. Fantastic! Thanks a load for the info! I'm having a blast. Teehee.
  30. Milkman

    Milkman Newbie

    Anyone know the NPC classes for HL1:S?
  31. xdiesp

    xdiesp Newbie

    > Specifies friendly fire where, to what..?

    I need to hurt civilians and vortigaunts that I turned hostile against me
  32. madcat75

    madcat75 Newbie

    Why are you talking to me?
  33. xdiesp

    xdiesp Newbie

    ah ah,for a moment I thought you were in charge here...!
  34. madcat75

    madcat75 Newbie

    haha no... I just was in here to hopefully figure out how to spawn a medic citizen, and make them look like a medic at the same time.
  35. xdiesp

    xdiesp Newbie

    madcat75: I'm trying hard at that. As of now,we can make a "white" dressed one that cures you,that's a start... Also,we can change antlions' skin too,so we must be close.

    Do you know where could we find a list of "standard" imputs as "sethealth" or "skin" to use in the ent_fire command? The right ones should be on the lines of "group" or "model"
  36. madcat75

    madcat75 Newbie

    I dont think there is an input command for "skin" or "group" or "model" cuz I looked at all the available commands in the single player mission, but didnt see any.
  37. xdiesp

    xdiesp Newbie

    how do you see them? "Skin" is there: ent_fire antlionname skin 1/2/3 makes antlions skin change
  38. itsmygame

    itsmygame Newbie

    Even though I have the full npc spawn list, I have to say this. OMG I ARE TEH THANKS!!!!!111oneone O.O
  39. itsmygame

    itsmygame Newbie

    I found those on every level. Quite fun watching giant bodies fly. :O
  40. Luke0086

    Luke0086 Guest

    To spawn a friendly turret:

    (Npc_create npc_turret_floor)

    rename any turrets you spawned to 'turret_buddy' -

    (ent_setname turret_buddy)

    whilst pointing at the turret you want to rename. then,

    (ent_fire turret_buddy setrelationship "player D_LI 90")
    this stops the turrets firing at you, and also makes it so that when you pick up the turret that is now friendly to you, the turret automatically turns around to easily place is on the ground.

    (ent_fire turret_buddy setrelationship "npc_metropolice D_HT 90")
    this makes the turrets target some of the combine soldiers

    (ent_fire turret_buddy setrelationship "npc_combine_s D_HT 90")
    this makes the turrets target the rest of the combine soldiers but also makes the turrets target each other if they are facing each other.

    (ent_fire turret_buddy setrelationship "npc_manhack D_HT 90")
    this makes the turret target manhacks

    (ent_fire turret_buddy setrelationship "npc_citizen D_LI 90")
    this stops the turrets targeting your buddies. but they will still be weary of the turret, keep on moving about facing it and hiding round corners also sometimes knocking the turrets over.

    (ent_fire turret_buddy setrelationship "npc_alyx D_LI 90")
    THIS SHOULD STOP THE TURRETS YOU SPAWN FROM TARGETTING ALYX IN THE PARTS OF THE MISSION WHERE SHE TELLS YOU TO USE THE TURRETS ALTHOUGH I HAVENT TESTED THIS ONE.

    you can do this with anything i think. (npc_create npc_manhack)

    then rename the manhack and set the relationships to the same as above.
Thread Status:
Not open for further replies.

Share This Page