Jump to content

How to make multiple units spawn on an airfield and have a move to trigger at the same time.


As the title suggests I need to have my aircraft take off from the airfield whilst inside a battle zone and then have those units move to a point on the map whilst the others are still spawning in. If i set them at the same time units stop spawning. would really help if someone knew what to do. I am recreating the Battle of Midway to point.

medal

Share this post


Link to post
Share on other sites

I don't really get what do you mean.

You want to move the AI units (by using waypoints) or players (teleport them or something)?

medal medal medal medal

Share this post


Link to post
Share on other sites

Sorry about the confusion. Let me break it down.

I have 116 AI+Player aircraft taking off from 4 japanese aircraft carriers which take about 4 minutes to do so. after they have all taken off I can move the AI to a waypoint close to midway island at 4000-5000 meters by using the trigger "unitmoveto" and that works fine. during that time the carriers will be attacked by enemy AI. instead of the units taking off and flying in a circle I want them to attack the enemies airfield instead.

If i set "unitmoveto" before the 116 aircraft have taken off, lets say 70 aircraft have taken off and i use "unitmoveto" the remaining 46 aircraft will not spawn on the carriers/airfield. I would like my planes to have a movement order and be able to spawn in and recognize where to move to at the same time. 

 

not teleporting :). i am sorry this is confusing.

 

 

Edited by Genda_Minoru_
medal

Share this post


Link to post
Share on other sites

Here is a more sophisticated explanation.

Initial: Japan has 4 aircraft carriers. and these aircraft will takeoff from the 4 carriers once the mission is loaded.

Akagi CV 9 A6M2 and 9 B5N2

Kaga CV 9 A6M2 and 18 B5N2

Hiryu CV 9 A6M2 and 18 D3A1

Soryu CV 9 A6M2, 18 D3A1 and 9 B5N2  These aircraft will be in a squad "Japan Attack 1"

 

After 4-5 Minutes have past the US will start spawning their first bombing force called "US Attack 1" which consists of:

 

Runway 1: 4 B-35 and 15 B-17

Runway 2: 16 SBD-3, 11 SB2U-3 and 6 TBF-1 

 

 

The Japanese "Attack 1" will fly to a zone 7km outside of Midway Island "Japan Target"

and the US will fly to a zone near the Japanese Carriers "US Target"

 

once the Japanese "Attack 1" reaches the zone they will attack the US Airfields, AA, Trucks, Aircraft and Ships.

 

once the Japanese "Attack 1" reaches the zone the US will quickly spawn defensive fighter aircraft (US Defense 1) to defend against the Japanese Attack with:

I want these to start attacking as soon as they spawn on the airfield

Runway 1:  20 F2A-3

Runway 2: 6 F4F-3A

 

The Second Japanese Attack "Japan Attack 2" will start at 16 minutes game time which will consist of:

Akagi CV: 6 A6M2 and 18 D3A1

Kaga CV:  6 A6M2 and 18 D3A1

Hiryu CV: 3 A6M2

Soryu CV: 3 A6M2

 

They will do the same as "Attack 1"

 

At 20 Minutes game time the US will start their Second attack "US Attack 2"

this time they will spawn on their 3 carriers but only 2 are used for the attack

 

USS Enterprise CV: 20 F4F, 28 SBD-3 and 14 TBD-1

USS Hornet CV:      27 F4F, 37 SBD-3 and 15 TBD-1

I have set a take off interval which will make them take longer to take off and will take about 12 minutes to take off. However i would like the aircraft to start flying to the US Zone named "US Target" near the Japanese Carriers once they spawn in and not after 12 minutes.

 

there is more info, but this is the gist. I have been able to create everything and make them do as I want them to except that if I want them to moveto (flying) a target before they finish spawning in, the remainder will not spawn in. 

 

the only other issue I have is that I don't want aircraft collisions on whilst on the runway as the AI are very good at crashing lol.

 

hopefully this makes it a little easier to understand.

 

medal

Share this post


Link to post
Share on other sites
Quote

I have set a take off interval which will make them take longer to take off and will take about 12 minutes to take off.

So it will take them 12 minutes to take off (all of them) and send them to selected zone as soon as the spawn and takeoff?

 

Just create a new trigger and enable the "enableAfterComplete" option, then set its periodicEvent to 5 or 10 and put that unitMove action there, but since that will probably break them you will have to add another trigger or just put a new action called unitMark in some other trigger (important note - do it only once, so that trigger can be activated only one during the mission and you can't enable the "enableAfterComplete" option for it) and give a number to all units from "US Attack 2" (for example 1) and then add another trigger which will stop ordering those units to fly to that zone (unless you want them to keep coming back there) and add unitWhenStatus condition, set it to isMarked, set the number to 1 and another condition whenInArea with that your area where you want to move them, don't forget to set it so the unit needs to meet all conditions in order to activate the trigger (you have two options above "enableAfterComplete", ANY or ALL, set it to ALL). In actions add the "unitMark" action and set it to 1, then at the bottom enable "useForTriggerFiltered" so it will start giving that mark to all units that are in the area.

 

So basically it should look like that:

 

1. trigger (needs to be enabled before their spawn)

enableAfterComplete:b=no

Event:

PeriodicEvent - 1

Conditions:

- - 

Actions:

unitMark - "US Attack 2" - number: 1

 

2. trigger

enableAfterComplete:b=yes

ALL

Event:

PeriodicEvent - 10.0

Conditions:

unitWhenStatus - isMarked - number: 1

Actions:

unitMove - object: "US Attack 2" - target: That your area - useForTriggerFiltered:b=yes (enabled)

 

3. trigger

enableAfterComplete:b=yes

ALL

Event:

PeriodicEvent - 5.0

Conditions:

unitWhenStatus - isMarked - number: 1

unitWhenInArea - object: "US Attack 2" - target: That your area

Actions:

unitMark - "US Attack 2" - useForTriggerFiltered:b=yes (enabled) - number: 2 

medal medal medal medal

Share this post


Link to post
Share on other sites
3 hours ago, Genda_Minoru_ said:

and for AI planes to take damage from AI ships cause they seem to be immortal for some reason.

Did you reduce AAA's accuracy or something?
Also which ships are you using, those high quality ones that can be used in naval battles, or those low quality ones for air battles?

medal medal medal medal

Share this post


Link to post
Share on other sites

tried setting a few AAA settings which did not seem to work. i have every unit set as attack gound/air and targeted by AI. tried setting the AAA to fire randomly and in game the player squad gets killed off quite quickly and fires at the AI units but does not seem to kill any in the 60 minute time frame for the mission.

Battle_of_Midway June 4 Revised.blk

medal

Share this post


Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...