Jump to content

How to balance player with AI aircraft in a multi-player mission?


Recommended Posts

Posted

I am building a MP mission - PVE - where I would like to balance the number of player and opposing AI aircraft.

 

The mission consists of a Strike Package of four Blue AI ground attack aircraft which are escorted by up to four player manned Blue fighter aircraft. The opposition consists of up to four Red fighter interceptor aircraft. What I want to achieve is that when a player spawns in one of the Blue escort fighters this triggers an AI fighter interceptor to also spawn in. At the moment I have only been able to achieve this by having each Red aircraft as a separate Group which is then GROUP ACTIVATE'd by a player spawning in in a relevant Blue escort slot.

 

Trigger goes something like this ONCE / UNIT ALIVE - Blue 1 / GROUP ACTIVATE - Red 1 where Blue 1 is a client aircraft slot and Red 1 is a Red AI aircraft

 

While this works, it is not very elegant. Has anyone any suggestions how to make it more elegant / efficient?

Posted

Hi Habu_69

 

I looked at MOOSE's AI Balancing but that appears to only apply to the one side. That is if there are four red aircraft client slots and one client slot is selected by a player then the other three slots are occupied by AI - until such time as another player selects a slot when one of the AI then RTBs resulting in two red players and two red AI etc.

 

According to the lua file the Spawned AI script and the Patrol AI script do the following:

 

Spawned AI

1. If no player is logging into the red slots, 2 red AI planes should be alive.

-- 2. If a player joins one red slot, one red AI plane should return to the nearest home base.

-- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base.

 

Patrol AI

1. If no player is logging into the red slots, 2 red AI planes should be alive.

-- 2. If a player joins one red slot, one red AI plane should return to the nearest home base.

-- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base.

-- 4. Spawned AI should take-off from the airbase, and start patrolling the area around Anapa.

-- 5. When the AI is out-of-fuel, it should report it is returning to the home base, and land at Anapa.

 

Whereas what I am seeking is for a red AI to spawn in whenever a Blue slot is selected by a client thus balancing the number of red and blue aircraft on the two sides in relation to the number of players who select a blue slot.

 

I might fiddle with the Patrol AI script to see if it can be adapted to meet my need.

 

Cheers and thanks for your reply.

  • Recently Browsing   0 members

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