Event coding question
Posted: Thu Jan 25, 2018 2:39 am
I have a series of events I want to trigger and am trying to find the best solution.
Here is the problem
1. There is a CAP mission set up over a target with 12 aircraft set with the 1/3 rule = true
2. If an enemy raid is detect inbound, an event triggers that converts the mission to 1/3 rule = false
3. After a period of time has passed sufficient to allow for enemy raid ingress, attack, and egress I want to return the mission to its base state of 1/3 rule=true
I have set the event action to ScenEdit_SetMission({onethirdrule=true})
The problem is that immediately after the raid assuming all twelve aircraft will be in the air. I am looking for a code that will tell 1/3 of the airborne aircraft to land.
Can I use the condition_v: value from the unit table? Documentation doesn't really explain other than its the air ops condition. I am assuming (and correct me if I am wrong) that this is a value to determine landed vs airborne. If I am right, what are the values this call returns (documentation says "string")
I have an idea of using a loop with a check for unit existing and airborne and then setting the remaining aircraft to RTB.
I just need to be sure if I can use the "condition_v" parameter and what the expected values are
Here is the problem
1. There is a CAP mission set up over a target with 12 aircraft set with the 1/3 rule = true
2. If an enemy raid is detect inbound, an event triggers that converts the mission to 1/3 rule = false
3. After a period of time has passed sufficient to allow for enemy raid ingress, attack, and egress I want to return the mission to its base state of 1/3 rule=true
I have set the event action to ScenEdit_SetMission({onethirdrule=true})
The problem is that immediately after the raid assuming all twelve aircraft will be in the air. I am looking for a code that will tell 1/3 of the airborne aircraft to land.
Can I use the condition_v: value from the unit table? Documentation doesn't really explain other than its the air ops condition. I am assuming (and correct me if I am wrong) that this is a value to determine landed vs airborne. If I am right, what are the values this call returns (documentation says "string")
I have an idea of using a loop with a check for unit existing and airborne and then setting the remaining aircraft to RTB.
I just need to be sure if I can use the "condition_v" parameter and what the expected values are