Semi-randomized enemy spawning?

I’m trying to fill out my level with some more randomized elements, such as a way to spawn soldiers on the level randomly in certain places at runtime. I tried setting up a logic case/ npc_template_maker setup where npcs were supposed to spawn close to the player but out of their line of sight. However, the game didn’t seem to respect player LOS and spawned with no regard for the player. Has anyone tried something like this and know how to do it? I found video tutorials on how to make a random spawn timer, but not spawning in a group of random spawnpoints.

If need be I can always just put a soldier in the location and have a patrol output on spawn so the soldier is in a different place each time, but I’d like to have a bit more randomization than that if I can.

My best suggestion would be to use trigger_looks set to disable the spawn points when a player looks at them and disable them when the player looks away again.

The other big thing is that logic case was not picking randomly, it was just spawning both random spawners. Maybe my entity setup was too complex.

That sounds like a related problem with the logic_case structure. I’d suggest removing some variables and starting with just one spawner that spawns at set intervals and one trigger_look enabling and disabling it. Then once that’s working, you can move up to multiple random spawners.

I might need to make a fork of the map, I’m at 114% entdata in the current build. A new version that takes out all existing NPC spawns and puts on a full randomizer.

Thanks to engine improvements by the devs, maps can now theoretically go up to about 400% entdata- they just never adjusted the scale of the counter.

I’m not using Black Mesa as my base. This is default SDK 2013 with HL2-HL2E2 assets.

So more likely than not I wouldn’t have gotten those specific benefits without having to port default assets into BM. IIRC the entdata on 2007 was 120% before you start getting crashes.
The screen effect on these screenshots is supposed to be Combine night vision goggles affecting the player’s view. I may cut this effect later if people hate it.

I don’t believe you have the right coloration for night vision.
This is an image from the GPNVG-18 which was the one used when Osama bin Laden’s compound was attacked. (It’s only $35,000). It gives a 97 degree FOV rather than the standard 40 degree FOV.
As you can see, there’s MUCH more green and brilliant whites in actual images than you’re displaying in yours.

The effect at current is using the Combine Binoculars filter from the coast chapters. I think it could look more accurate if I decided to relight the entire map with green colors, but I kinda liked the blue tint in terms of a stylistic choice. Blue NVGs may not be realistic but it might make sense for Combine because of their soldiers’ augs or something.