Jump to content
Blitzen88

Anyway to make AI prioritize “Frontline” spawn points?

Recommended Posts

Im making a mission where Nato and Csat start at their base and then proceed to capture a handful of sectors.  New spawn points are unlocked depending upon who controls a sector.

 

However, as more and more sectors are captured, more and more spawn points are available for the AI to spawn at.  This leads to AI spawning at positions that are not always near the frontline. Is there anyway to force AI to spawn at spawn points that are closest to the nearest enemy controlled sector?

Share this post


Link to post
Share on other sites

@Blitzen88,

Quote

Is there anyway to force AI to spawn at spawn points that are closest to the nearest enemy controlled sector?

There are several ways for sure. Which one is best suited to your case will rely on more info.
For example: If your battle only moves forward you can simply delete unused points with "deleteVehicle".
If the battle moves around, and spawn points are sometimes high priority and sometimes low priority, it becomes a bit more complicated but still totally do-able.

Try to post as much info as you can so we know what we're working with.

It kind of sounds like your only need spawn points at the current area of contention. You could make it so the same (or a couple/few) spawn point(s) just moves around where needed.
1) Have triggers define "areaTAG" (areaTAG=1, areaTAG=2, ect)

2) script something like,
currentBattle= [area1, area2, area3] select areaTAG;
if (currentBattle = area1) exitWith {
respawnMARK setpos (getpos currentBattle);
execVM "badguys.sqf";
};

3) Make "badguys.sqf" represent your spawn script and spawn at "respawnMARK".

The above is a quick example. If that is what you need we'll make it function.

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

×