Jump to content

Suggestions for a good AI Package for enemy snipers


devinpatterson

Recommended Posts

I was wondering if anyone had suggestions for a good AI package for enemy snipers. I'm using the guard package with guard location->near current location and continue in combat behavior->remain near guard location and a huge guard radius (5000). But sometimes my sniper npc will come out of the cliffs and get himself killed. He is also terrible at spotting the player and even though only his helmet is showing he is pretty easy to pick off long before he detects the player. Is there something I can set up like a trigger that alerts him to start sniping but also keeps him in his cliffside perch? That way I could simulate the sniper keeping a watch on the mouth of the valley with his binoculars.
Link to comment
Share on other sites

If you have fallout 3 check out Arkansas' sniper package. Reference to guard is an object (merry go round) with radius of 1500, and guard location is an xmarker with radius of 256, that is where he stands. Remain near guard location is checked.

 

Flags are Continue if PC near, weapon drawn, no combat alarm, and enablle fallout.

Link to comment
Share on other sites

The guard radius controls how far he is allowed to move. Sounds like you want guard radius 0. The *aggro* radius controls how far away the player can be, before the NPC starts attacking. Sounds like you want aggro radius 5000. Side note, 5000 seems pretty large. How does that compare to the maximum effective range of the weapon?
Link to comment
Share on other sites

The guard radius controls how far he is allowed to move. Sounds like you want guard radius 0. The *aggro* radius controls how far away the player can be, before the NPC starts attacking. Sounds like you want aggro radius 5000. Side note, 5000 seems pretty large. How does that compare to the maximum effective range of the weapon?

 

Sorry for the late response, playing dead money. Yeah I did confuse guard radius with aggro, thanks for clarifying that for me. But I still think I need a giant trigger in front of the valley and maybe a script to alert the NPC sniper, because NPC detection seems so bad. Any suggestions for a script like that (would be great if it didn't trigger if all actors were using a stealth boy/effect)?

 

b3w4r3: I will defnitely check that out and see if there are any other sniper packages in the vanilla assets

Link to comment
Share on other sites

If you use a giant trigger, be sure to use "ontriggerenter player" rather than "ontrigger player" so that it does not re-execute every frame for some minutes. If you put a giant trigger, and alert the NPC, but the NPC cannot detect the player, what do you want to have happen? I am not sure anything will happen. But, you could certainly add "sniperRef.startcombat player" into the script to make the NPC declare war.
Link to comment
Share on other sites

If you use a giant trigger, be sure to use "ontriggerenter player" rather than "ontrigger player" so that it does not re-execute every frame for some minutes. If you put a giant trigger, and alert the NPC, but the NPC cannot detect the player, what do you want to have happen? I am not sure anything will happen. But, you could certainly add "sniperRef.startcombat player" into the script to make the NPC declare war.

 

I see, so he could be "alerted" but wouldn't necessarily know where the player is to attack him? Hmmm yeah that would be a problem. I guess I'm looking for a way to alert the npc sniper to the players presence and begin combat. It just seems NPC's are really crappy at detecting the player, even when he/she isn't sneaking or invisible. In my experience (in the wilderness) I almost always see them long before they notice me. Makes them a sitting duck.

 

Oh and regarding the range issue, yeah 5k is a lot, I was trying to use a gauss sniper rifle as part of the mod. It was to have ridiculous range (around 4k) so they could snipe before a player could hit them with a sniper rifle. I guess I should change it to 4k the max range of the gauss sniper rifle.

 

I suppose I could put him closer but disabled and the trigger would enable him & alert him. The effect that I would try to simulate would be the sniper hiding until he is ready to attack then popping up to fire a few rounds.

 

BTW thanks for the tip on ontriggerenter player. Much appreciated.

Link to comment
Share on other sites

It might be worthwhile to look at the way the artillery strikes near Nellis airfield are implemented, or the FO3 town of Minefield. I'm not sure if Nellis has an actual person firing or if it just materializes explosions around you. I remember the sniper at Minefield being quite tough at low levels, maybe there is something you can use for inspiration there.
Link to comment
Share on other sites

It might be worthwhile to look at the way the artillery strikes near Nellis airfield are implemented, or the FO3 town of Minefield. I'm not sure if Nellis has an actual person firing or if it just materializes explosions around you. I remember the sniper at Minefield being quite tough at low levels, maybe there is something you can use for inspiration there.

 

 

Following on from this idea, as far as I remember, Arkansas was scripted to fire at cars when the player passed near them, causing them to explode and simulating the effect of him having noticed you. In reality, however, he never even enters combat with the player till you're much closer.

 

Devinpatterson,

An idea might be to have your sniper set a trap like explosive barrels or simply to fire at invisible markers that the player will trigger by walking over. A bit complicated and the sniper still won't properly engage in "combat" until the player is the normal distance away.

But I can see it working because:

 

A: If there are explosives set up that the sniper can ignite by firing at them, then the player won't have time to pick out the sniper in the rocks for all the explosions. (this was my experience in minefield anyway).

 

And

 

B: Anyone playing your mod won't be expecting the sniper anyway. So if the npc starts sniping at spots close to the player, and the bullets are tearing up the dirt next to them, it's pretty much going to simulate the experience of getting sniped at. As close to that experience as you can come in a game where you can take 30 headshots without dying anyway =P

 

 

Sounds like you've got an interesting mod coming along. Good Luck!

 

As an afterthought, if you can't look at the minefield script for any reason, I believe the ranger veterans guarding General Oliver use a similar package in the final battle (only if you play legion).

They fire at you and set off traps when you get close, even though your HUD is still clearly showing that you're "hidden".

Edited by kibblesticks
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...