Jump to content
Sign in to follow this  
rexehuk

Getting enemy AI to SPOT and SNIPE as a team

Recommended Posts

Hey guys,

Wondering if this is possible to do? I've been wanting to have a two man enemy AI sniper team for some time that will actively WATCH via binocs and relay targets to his team member on the sniper rifle without moving their position.

Anyone know if there are good methods for doing so? This could also apply to AI manning static guns/konkurs/metis and give them a real fighting chance against real players.

Rgds,

Rob

Share this post


Link to post
Share on other sites

Very simply, you could simply disable the movement ability of the 2 units, and set their position to "DOWN" (basically Prone).

In their Initialisation box put:

this disableAI "MOVE"; this disableAI "ANIM"; this setUnitPos "down";

That should make the units unable to move around, unable to change their position, and force them into prone. From there they'll probably pick off targets if they can. Not sure about how to force an AI to use their binoculars though.

A couple of questions though:

  1. Do you need to be able to hear the two units communicating with eachother?
  2. Will you be able to see the units? If not it might not be worth the spotter being there.

To script a fully-working AI Sniper Team would require a bit of coding, and the spotter would have to spot and then tell the sniper what to target and shoot at.

I don't actually know the correct commands, but if you could force the spotter to use binoculars, you could (and this is NOT real code) do something like:

_target1 = spotter target;
spotter groupChat "Target spotted.";
sleep 5;
sniper doTarget _target1;
sleep 5;
sniper doFire _target1;

I'm sure somebody on here could work something out!

Share this post


Link to post
Share on other sites

Firstly, the disableAI move command is BAD, DO NOT use it in MP missions as it reduces the flexibility of the mission. What happens if we attack from a different angle and the AI is still looking in one direction? It's a very crude method!

I do know there is a doWatch command where you can get an AI to scan say a 45 degree field, the centre of which is a game logic which you create. I haven't had a chance to test this yet.

Basically all I want to do is:

1. Have a leader + Sniper in same group (Prob best method to give sniper targets)

2. Leader just uses his binocs and scans for targets, then tells sniper to shoot them (without the sniper getting up and running off to engage)

Main reason for this is the current engage distance for snipers is a joke, mainly due to them not seeing far enough ahead to call you out as a target. Aim of this is to just get them pot shotting you from a distance, causing a bit of panic as you wont know where it's coming from for a while.

Share this post


Link to post
Share on other sites

Rob, write something to Monsada, the UPSMON creater. He has his AI talking via radio, maybe he can point you in the right direction

Share this post


Link to post
Share on other sites

Has this question been answered rexehuk? If so, it could also work for an entrenched MG. (Placing a spotter, as well as a SL, to extend the range past 200m).

I'd be interested to hear what the answer turned out to be.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×