Black Mesa

Black Mesa

View Stats:
Console command to spawn a sentry turret?
I have now played through this game several times, and found an sk_ command to increase ammo of sentry turrets so they don't run out that fast.

But not sure how to spawn a sentry turret that is either friendly and/or points away from me when spawned.

I intent to use the {T} Key on my keyboard to run the command(s)...
If multiple commands i guess i'll run an Exec command.

Any one out there willing to help me mess around in the game in a more silly way?

Already modded weapons to have 999 clip ammo - with 9999 ammo in reserve.
Plus other things, want to mess around with the turrets :D

EDIT: Any command to make any NPC I aim at and activate, turn friendly?
Last edited by Copper Boltwire; May 4, 2020 @ 9:11am
< >
Showing 1-11 of 11 comments
Copper Boltwire May 4, 2020 @ 11:11am 
I found the commands i needed - almost, having a little hard time making named entities attack their own kind, unless they too are named...

So for instance, can't seem to make "DoodleTurrets" attack "npc_turret_ground" but ignore those with "DoodleTurrets"

It's either Attack or not... can't make like 2 teams of sorts... seems to work fine in any other instance...

My turrets never bother friendly vorts or BMS personel now XD
marcel May 4, 2020 @ 3:31pm 
You can also increase through maximum ammo capacity for sentry turrets through thr skill.cfg file, lot easier then having to put in that command.
Last edited by marcel; May 4, 2020 @ 3:31pm
Copper Boltwire May 4, 2020 @ 6:17pm 
I already have the skill.cfg set the sentry's max ammo to 9999 - sooo it won't run out...

And even if i gave the turrets 99999 HP the "balanced" part is that they fall over very easily even with 9mm bullets hitting it, so it's quite unstable even with that much HP :P

Overall, still having loads of fun.

Incase anyone wants to look at my two "commands" i use:

Bind "t" "exec z_spawn_turret.cfg"
npc_create npc_sentry_ground

Bind "y" "exec z_set_friendly.cfg"
//////////////////////////////////////////////////// // Make Black Mesa personal LIKE DoodleTurrets // Make DoodleTurrets LIKE Black Mesa personal & Player // ( Could use this against ceiling turrets and the like. Makes for easy targets :P ) // // This feature must be called every time you load to a new area. // DoodleTurrets forget their alliances... ent_setname DoodleTurrets ent_fire !picker setrelationship "player D_LI" ent_fire !picker setrelationship "DoodleTurrets D_LI" ent_fire !picker setrelationship "npc_human_scientist D_LI" ent_fire !picker setrelationship "npc_human_scientist* D_LI" ent_fire !picker setrelationship "npc_human_security D_LI" ent_fire npc_human_scientist setrelationship "DoodleTurrets D_LI" ent_fire npc_human_scientist* setrelationship "DoodleTurrets D_LI" ent_fire npc_human_security setrelationship "DoodleTurrets D_LI" ent_fire DoodleTurrets setrelationship "npc_barnacle D_HT" // My friendly turrets NEEDS to be bullet spongy // Only works for DoodleTurrets - Can also be used to reset low-health turrets. // Cannot be used to restore broken turrets. ent_fire DoodleTurrets SetHealth 100 /////////////////////////////////////////////////// // Make others HATE DoodleTurrets ent_fire !picker setrelationship "npc_sentry_ground D_HT" // Does not seem to work... hmmm... ent_fire !picker setrelationship "npc_sentry_ceiling D_HT" ent_fire npc_human_grunt setrelationship "DoodleTurrets D_HT" ent_fire npc_human_medic setrelationship "DoodleTurrets D_HT" ent_fire npc_human_commander setrelationship "DoodleTurrets D_HT" ent_fire npc_human_grenadier setrelationship "DoodleTurrets D_HT" ent_fire npc_human_assassin setrelationship "DoodleTurrets D_HT" ent_fire npc_alien_* setrelationship "DoodleTurrets D_HT" // Includes the friendly Vorts, for now... ent_fire npc_snark setrelationship "DoodleTurrets D_HT" ent_fire npc_headcrab setrelationship "DoodleTurrets D_HT" ent_fire npc_houndeye setrelationship "DoodleTurrets D_HT" ent_fire npc_bullsquid setrelationship "DoodleTurrets D_HT" ent_fire npc_ichthyosaur setrelationship "DoodleTurrets D_HT" ent_fire npc_gargantua setrelationship "DoodleTurrets D_HT" ent_fire npc_tentacle setrelationship "DoodleTurrets D_HT" ent_fire npc_houndeye_suicide setrelationship "DoodleTurrets D_HT" ent_fire npc_xentree setrelationship "DoodleTurrets D_HT" ent_fire npc_xenturret setrelationship "DoodleTurrets D_HT" ent_fire npc_barnacle setrelationship "DoodleTurrets D_HT"

Still messing around with it, but so far it works, haven't gotten to interloper for example and tested turrets against friendly vorts and which NPC_ALIEN_* to use...
But that's it so far... works great up until Xen where things get a bit weird...

EDIT: Forgot to mention that i did try with just 1 file... but it does not always apply the relationship settings to make turrets friendly.
But splitting them into 2 files/commands works pretty well... can be a little... finicky...

Might try and replace turret with a Super powerful security guard or something...
At least he can move around :P
Give him an MP5 or the OP Revolver...
Shame i can't issue commands to my followers like in HL2... could come in handy...
Last edited by Copper Boltwire; May 4, 2020 @ 6:20pm
600piecesof8 May 5, 2020 @ 1:51pm 
Bind "t" "exec z_spawn_turret.cfg"
npc_create npc_sentry_ground

Bind "y" "exec z_set_friendly.cfg"

"exec" is the command to execute a script from a file. In the first instance, it might be faster to bind just to that create command instead of calling a script to do the same. But ofc it works.

I also post this, because it is somewhat related.
https://steamcommunity.com/sharedfiles/filedetails/?id=502670746
Copper Boltwire May 5, 2020 @ 2:01pm 
Yeah, i know these things - But they are not really that needed - All i need to do is press zhe buttons

A "Custom" folder is redundant to what i do.
No need to add an extra layer just to call several console commands when i can just chug the "script", as you call it, into a .cfg and then exec that file...

Adding it to a custom folder is just more work for the same feature essentially.
And i have nearly gotten everything i needed out of this, so i'm golden.

The only 3 things i need now is as follows:
1} Turrets don't spawn, by default, away from me, but facing North (Or at least I THINK it's NORTH.)
2} Force them to stay upright, and never fall over, atleast not until they die :D
3} Figure out the ID of what the friendly vorts are called in the game so i can setup proper friend/foe relationships on my "DoodleTurrets". (This one I'll figure out by myself once I finally reach interloper section of the game :D )

I wonder how quick it is to kill Nihilanth with just a bunch of never tilting, friendly turrets :D
600piecesof8 May 5, 2020 @ 2:06pm 
Yeah, that link was as I wrote unrelated, but if your script contains only one line like in the first case, it is faster to directly bind to the command. But this is being finicky.

To get the vorts, go to a level containing them and do a "report_entities". It should be listed.

edit: Forgot the underscore "_".
Last edited by 600piecesof8; May 5, 2020 @ 8:30pm
Copper Boltwire May 5, 2020 @ 2:24pm 
Well, thanks that will help a lot... "Report Entities" will have to remember this!
<width=1>Pacman09 May 29, 2023 @ 1:45pm 
how do I make your exec file work? do I just name a .cfg file z_set_friendly.cfg? then bind it?
<width=1>Pacman09 May 29, 2023 @ 1:45pm 
I already put the stuff in it though so it should work
<width=1>Pacman09 May 29, 2023 @ 1:53pm 
where do I put the cfg? it doesn't work in custom or BMS
Copper Boltwire May 30, 2023 @ 1:37am 
Originally posted by pacmanproductionsz27:
where do I put the cfg? it doesn't work in custom or BMS
try make a custom within bms?
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: May 4, 2020 @ 9:07am
Posts: 11