Super happy NPC spawning guide

Status
Not open for further replies.
madcat75: in my opinion,two answers to that: because it's possible to change it but with another command object (not a number) or because it was possible before and now it's not
 
I have a way to get rid of ANYTHING easily with just one tap of a binded key, corpses, NPC's, objects, items....even spawnable points!

How to do it:
1. open console
2. Type bind (whatever key you want) "ent_setname abc123(or another nonsense name that you would never name a NPC);wait;ent_fire abc123 kill"
3. Close console
4. Press the key you have bound, and whatever your crosshair is pointing at at the time (even through walls, so be careful you don't destroy a story or mission-critical npc, spawnpoint, or button. Be careful what you "shoot" with this.) will just be GONE. NADA. ZIP. Not even a poof!

However, i must warn you, if you use this you may accidently miss your intended target and take out something else. I've accidently destroyed the jeep or airboat a couple of times and had to restart the whole level or restart from a save i made 45 min ago :rolleyes:.

This is particularily useful when fooling around with NPC's in garrysmod: the remover gun does not take out corpses that were once alive. This does. And it's always fun to take out Dr. Breen or Alyx during dialog:
Kleiner: Alyx has just installed the final piece for our ressurected teleport!
Alyx: I can't take any credit for the breakt-(dissapears)
Kleiner: (Just stands there, waiting for alyx to complete her sentence, which will now never happen, then goes poof too)

Hope this helps the people who are having problem with the little corpse floodi-er...OVERPOPULATION problem. :D
 
YangMan said:
I think (hope) I might have another break through, but I never got to test it before my entire computer crashed. Now I'm re-installing everything, and HL2 is unfortunately very low on the priorities list.

Anyway, when I first tried to bind a key to make an npc friendly, for example:

bind "NP_ENTER" "ent_setname "friendly"; ent_fire "friendly" setrelationship "player D_LI 900""

Which should work by theory, except that it doesn't seem to be able to support quotation marks within quotation marks... And if you do something like:

bind "NP_ENTER" "ent_setname friendly; ent_fire friendly setrelationship player D_LI 900"

The engine thinks that you're trying to input "player" as the argument for setrelationship (which draws an error), rather than "player D_LI 900", which is the correct argument.

So where does this leave us? Hopefully with a solution. Note: The following idea has not been tested yet due to my computer crashing, but I thought that maybe it might help some of you if it does work. Plus, I'm dying to know.

Well, we can't have "..." within a "...", so then we need to make "player D_LI 900" into a single argument, without a space (and therefore eliminating the need for "..."). The only way I can think of is using alias. For example (and I hope this works),

alias "like_player" "player D_LI 900"
bind "NP_ENTER" "ent_setname friendly; ent_fire friendly setrelationship like_player"

Therefore we've eliminated the need for "..." as the argument no longer has a space. Could someone please test that? If it works, then you could use a similar method to make them hate combine and like your allies, etc.

Another, unrelated, idea that I wanted to test but never got the chance to was about getting antlions and alyx/barney to follow you. It's obvious now that Valve took a shortcut and didn't make the antlions really check whether you have bugbait or not, rather, it is either map-based or some variable is changed after a certain level. It is the latter that I am hoping for.

The latter is the case with the supercharged gravity gun. As, if you load the map in which you have the blue gravity gun with map [map_ name] (can't remember what it was), then changelevel [map_name] to a map where you're not meant to have the super gravity gun (and type impulse 101 if you're not even meant to have the normal gravity gun), then you will be given the super gravity gun instead.

This is what I am hoping for with the antlion thing as well. Could somebody try to use map [map_name] to load a sandtraps or nova prospekt level where the antlions are friendly and also hear your bugbait squeeze and not just throw, then use changelvel to load a previous level, where the antlions aren't friendly, hopefully the antlions will also be fully respondant to the bugbait and like you too. Could someone test that and posts the results here?

Maybe that would also work with alyx and barney. Load a level where they follow you, then change it to one where they don't. Just a theory, which I unfortunately can't test right now.


You can use the ' and ' within " and "
 
Really? I thought I tried but it didn't work... I'll have to try again soon...
 
Jetman: kill has never worked with corpses

instead,if you want to edit SP maps while preventing important scripts to be fired when you pass,type:
ent_fire trigger_multiple disable
ent_fire trigger_once disable
(revert it to enable when you've finished)
 
if you think about it,it's perfectly normal that kill doesn't work with corpses. It would be necessary,instead,an exorcise command
 
xdiesp said:
Jetman: kill has never worked with corpses

Really? Funny, Kill works with corpses for me. You got a different version or something?

It's always worked for me, so either something funny is going on or there is something different about my copy of HL2.
 
*bump* :E
Does anyone know how to get striders and gunships to move? I tried the npc_select and npc_go commands with no success. :(
 
ent_remove works nicely on nearly everything, its my mouse4 button.
 
download the mega mod for garry mod bonita, but its known that striders dont move anyway. But gunships do move at first then get stuck.
 
hey, i'm new, but i have found out how do remove dead bodies,
use super grav gun(alt fire) and use the code ent_remove on it when you're holding it, hehe, or use vortigaunts to kill them, not so messy annymore:p
(cus it clears bodies away totally)
and a nice war:
vortigaunts against combine soldiers with RPG's
 
ent means entity, i guess. If you've ever used C++ or java, this sort of programming makes sense, just wish I had the time and use for such stuff.

Edit: Oh sorry, I was on one of the first pages and replied to a post there, lol. :upstare:
 
whooo hoo, this is a great thread, I've got lots of new things to try already.

The thing that bugs me the most is spawning elietes. Of course, objects like expolsives would be fun, but I'll settle for a trick for getting the white combine soldiers. If anyone with experience naming entities knows how to do this, or if there is any solution what so ever, please let us know. the blue combine_s guys are getting recycled.

thanks
 
Hectic Glenn said:
download the mega mod for garry mod bonita, but its known that striders dont move anyway. But gunships do move at first then get stuck.

There are some examples of maps where striders move, as well as gunships, so there is a way.

Tim_coop-3 which is on rotation on my server has moving striders... and one of the starship trooper "like" maps has gunships that fly around and kick some butt. I think it may be antlion_troopers or something like that. If you can't find it and want to see it, let me know, I got it here somewhere. I got it from halflife2 filefront.
 
Like Riomhaire said, the mapper has to place hints where the strider (ground and air hints) or gunship (air hints) can go. It's actual not all that hard but the mapper has to do it.
 
Grand Architect said:
Like Riomhaire said, the mapper has to place hints where the strider (ground and air hints) or gunship (air hints) can go. It's actual not all that hard but the mapper has to do it.

Is there a tutorial or guide on how to do this somewhere..? I make a strider and it doesn't even attack! :(

Thanks..
 
Actual yes,
Code:
http://www.hl2 world.com/wiki/index.php/Striders_Part_I
Heres a tut from HL2 World (remove space) on striders and some help from this forums here.
 
i found a way to change a citizens rebel skin to a medic!

use npc_create npc_citizen;wait;ent_setname medic1;wait;ent_fire medic1 setmedicon
(or other number for medic1 or whatever)

then wait a bit away from the npc and when you return hell have the rebel medic skin!!!hope this helps with some of the npc names trying to be found!(other people might have discovered this)
(note this requires you are playing on a map where npc citizens created are rebels)
 
Here's something weird that is happening to me. Previously I was able to spawn floor turrets, rename them to turret_buddy and make them like me. Then I was able to successfully make turret_buddy hate metropolice, combine_s so they'll attack those respective npc's. Now when I try, I get an error: "Bad relationship type (D_LI_90) to unknown entity (player)" Now I know this works because I had success in the past.

Has anyone else seen this? And is there even a fix for it? Thank you.
 
ent_fire turret_buddy setrelationship "npc_combine_s D_HT 90"
 
Strange,previously "setmedicon" citizens just had the ability to heal others turned on,without any skin changes. Anyway,good to know!

And long live this glorious topic!
 
MagicalMonkey said:
setexpressionoverride is an input which allows you to make a character enact any scene. The usage is "ent_fire [character name] setexpressionoverride [file path of scene]". For example, to make alyx perform the gman's closing speech, you would name alyx alyx and type "ent_fire alyx setexpressionoverride scenes\citadel\gman_out".

is there a list of these scenes? how can i find out what all of them are named?
 
rambler: they are the names of the *.vcd files in steamapps\hl2content.gcf\scenes\etc Only beware that the hardest part is to imput the right path to the file,right now I can't remember but it may include also an initial "..\scenes\etc"
 
ríomhaire said:
ent_fire turret_buddy setrelationship "npc_combine_s D_HT 90"
Whoops I was typing an extra _ after LI or HT. Heh time makes fools of everyone. Thanks for setting me straight.

Now how about creating an exploding barrel launcher. If you set an exploding barrel to ignite and burst into flame, won't it explode? Or does the player have to shoot it or grav gun launch it? Just throwing out some ideas.
 
did anyone find out how to make spawned NPC's follow you? and actually, more importantly, i now know how to make an npc speak any speech in the game, but is there a way to make them inact the motions as well?

does anyone know the commands for the animations?

is there maybe an in-console list like there is for NPC sounds?

also, typing noclip into the console no longer seems to have any effect, any ideas?
 
rambler said:
also, typing noclip into the console no longer seems to have any effect, any ideas?
noclip should work :|
Try looking at the sv_noclipspeed command (just type in sv_noclip and the console should fill in the exact command) and check if it is set to something higher than 0.
 
i have a feeling it's something to do with sv_cheats

but more importantly does anyone know about the other thing? animation files for NPC's?

also, you know when the metro cops slap you unconcious in the first chapter, and when breen smacks you with the grav gun in the last chapter, theres this nice little fp animation where you start off looking at the ceiling but then you get yourself up. does anyone know if theres a console command for that?

also does anyone know how to trigger animations for NPC's? i can trigger any sound for any npc, or any speech, but not the animations to go with them.

alyx for instance has that little hair briush, and the leaning forward, spreading hands kind of shrug she does. you see it the first time when she says 'nice to finally meet you' (i think). they must be somewhere.
 
rambler said:
i have a feeling it's something to do with sv_cheats

but more importantly does anyone know about the other thing? animation files for NPC's?

also, you know when the metro cops slap you unconcious in the first chapter, and when breen smacks you with the grav gun in the last chapter, theres this nice little fp animation where you start off looking at the ceiling but then you get yourself up. does anyone know if theres a console command for that?

also does anyone know how to trigger animations for NPC's? i can trigger any sound for any npc, or any speech, but not the animations to go with them.

alyx for instance has that little hair briush, and the leaning forward, spreading hands kind of shrug she does. you see it the first time when she says 'nice to finally meet you' (i think). they must be somewhere.
I've seen the location of the animations somewhere in this thread... I'll see if I can find it again :p

And for that animation where you get up: I can probably recreate it quite closely using the "setang" and "setpos" command.
 
I think citizens follow you automaticaly, other than that I don't know how to make any follow you.
 
not that it's really a major concern, but after telling an alyx clone to say a gman speach for instance, she repeats it over and over. it's pretty creepy. but anyway........

does anyone know how to make them only repeat once?

i really would love to know where those animations come from though..

also, if we were to input our own vocals, would the lip synch work straight off? or would you have to animate them? 'm kind of expecting it to be the latter, but if it is, why did the alyx clone speak gman's stuff and move her lips?
 
rambler said:
also, if we were to input our own vocals, would the lip synch work straight off? or would you have to animate them? 'm kind of expecting it to be the latter, but if it is, why did the alyx clone speak gman's stuff and move her lips?
What I heard about it, you have to let a program look at the sound and it will create lip sync based on that. I think I read it in an article once.
 
xdiesp said:
rambler: they are the names of the *.vcd files in steamapps\hl2content.gcf\scenes\etc Only beware that the hardest part is to imput the right path to the file,right now I can't remember but it may include also an initial "..\scenes\etc"

what do i use to open hl2content.gcf?

dont worry, i found it. GCFScape. mmmm.....

i still want to know where the animation files are stored. i really don't know why i want to know.... but i do!
 
I think that there's a lip sinc programme in the SDK but I'm not positive.
 
acutally the animations do work, but only if you use the speech files with the relevant characters.

i would just ask, does anyone know where the speech file is for the alyx speech - the one that she gives right after you leave judith and eli to chase breen.

i thought they would be in the citadel file, but i've run them all and they arent there.

oddly though, neither are any mossman speeches, so i tried looking for them, but couldn't find them.

can anyone help?
 
maybe, but i cant see it. i'm going to try to detirmine what it might be by looking at error messages that i'll create by using ent_setname on npc_alyx or one of the others.

now if only it would stop crashing when breen fires the GravGun....
 
Whoa, so someone shoveled this thread out from 6 feet under and put it in the Indian burial ground, huh?

Sometimes ... dead is bettah.

Kidding though. This thread ruled.
 
Status
Not open for further replies.
Back
Top