Jump to content

Mission editor – Group retreat orders


Recommended Posts

Guys

 

I am trying to add a bit of dynamism to a mission. Basically I have an enemy naval convoy heading towards a friendly airbase. Once within range, I will have an amphibious boat group spawn around the transports and head for a beach landing. Once there, an amphibious assault group will spawn on land, etc., etc.

 

Now, my flight is tasked with attacking the convoy, (which is protected by 2 x frigates), before it can land troops.

 

To make this less of a “do or die” affair from the naval commander’s side, I want the naval group to turn and retreat if their escorts are destroyed.

 

As there aren’t any branching waypoint orders or group attrition variables available I was thinking of doing the following;

·
Set a conditional trigger which sets a “retreat” flag to “true” if
both
escorts are destroyed

 

·
Once set to “true”, the convoy group would be “deactivated” and a copy (sans escorts) would activate at the same spot with waypoints more suitable for a retreat situation, (running away!)

 

There are a few problems inherent with this approach;

·
How can I make sure that the newly activated group starts at the same position as the group it is replacing? I don’t want it to jump, (there arent any sort of getPosition() functions)

 

·
What if my wingman destroys one of the transports before the escorts? The “copy” group would appear with one apparently magically healed ship, (again, no $state type variables which would let me create a new group based on the status of the deactivated one)

As usual, thanks for any and all advice on this one :book:

 

 

Cheers

 

 

Coolts


Edited by coolts

[sIGPIC][/sIGPIC]

i7 9700k | 32gb DDR4 | Geforce 2080ti | TrackIR 5 | Rift S | HOTAS WARTHOG | CH PRO Pedals

Link to comment
Share on other sites

How can I make sure that the newly activated group starts at the same position as the group it is replacing? I don’t want it to jump, (there arent any sort of getPosition() functions)

You cannot. The best way to do this is to use a trigger zone and only replace the group if the escorts are destroyed AND the group is within the trigger zone. Set the size of the trigger zone small enough to minimize the jump between positions.

 

What if my wingman destroys one of the transports before the escorts? The “copy” group would appear with one apparently magically healed ship, (again, no $state type variables which would let me create a new group based on the status of the deactivated one)
Use single units instead of groups and do the tests on single units only. So if the escorts are dead AND the unit is alive, replace the unit.

There are only 10 types of people in the world: Those who understand binary, and those who don't.

Link to comment
Share on other sites

Cheers Case.

 

Theres also a "destroy bridge" strike element in my mission. DOH!

In order to get a trigger to detect when a bridge is blown, someone suggested parking a vehicle on the bridge then checking the status of THAT. Once the bridge blows, so does the vehicle and your flag activates.

 

What do you reckon?


Edited by coolts

[sIGPIC][/sIGPIC]

i7 9700k | 32gb DDR4 | Geforce 2080ti | TrackIR 5 | Rift S | HOTAS WARTHOG | CH PRO Pedals

Link to comment
Share on other sites

Cheers Case.

 

Theres also a "destroy bridge" strike element in my mission. DOH!

In order to get a trigger to detect when a bridge is blown, someone suggested parking a vehicle on the bridge then checking the status of THAT. Once the bridge blows, so does the vehicle and your flag activates.

 

What do you reckon?

 

I might do it differently, where I'd have a trigger zone before and after the bridge. When the unit is in the first zone it sets a flag which gets reset when it enters the second zone. Since it will take the unit some specified amount of time to pass the bridge and go from the first to the second zone, you can use a time since flag to check if the flag is still true after that specified amount of time has passed. If it is true, the unit didn't pass the bridge and the bridge is likely to be destroyed.

There are only 10 types of people in the world: Those who understand binary, and those who don't.

Link to comment
Share on other sites

Cheers. I will try both tonight and see which seems the most natural/flexible.

 

Here's hoping for a more robust editor in A-10 so we don't have to rely on so many hacks!

 

Thanks

 

C

[sIGPIC][/sIGPIC]

i7 9700k | 32gb DDR4 | Geforce 2080ti | TrackIR 5 | Rift S | HOTAS WARTHOG | CH PRO Pedals

Link to comment
Share on other sites

Case. my attempt didnt work. you cant put a waypoint on a bridge.

 

looking at your suggestion, I would need to have the vehicle constantly moving back and forth and timing its route to determine if the bridge was destroyed. (As the bridge destruction could happen within the 1st 20 mins of the mission starting).

 

it might be easier just to put a single truck near the bridge and hope that spash damage would take it out and trigger a flag.


Edited by coolts

[sIGPIC][/sIGPIC]

i7 9700k | 32gb DDR4 | Geforce 2080ti | TrackIR 5 | Rift S | HOTAS WARTHOG | CH PRO Pedals

Link to comment
Share on other sites

looking at your suggestion, I would need to have the vehicle constantly moving back and forth and timing its route to determine if the bridge was destroyed. (As the bridge destruction could happen within the 1st 20 mins of the mission starting).
Not really, you'd only spawn the vehicle when you want to know if the bridge is destroyed or not. You could spawn it when the aircraft has left the target area using a unit outside zone trigger.

There are only 10 types of people in the world: Those who understand binary, and those who don't.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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