Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Event coding question

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Event coding question Page: [1]
Login
Message << Older Topic   Newer Topic >>
Event coding question - 1/25/2018 4:39:29 AM   
vettim89


Posts: 3615
Joined: 7/14/2007
From: Toledo, Ohio
Status: offline
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


_____________________________

"We have met the enemy and they are ours" - Commodore O.H. Perry
Post #: 1
RE: Event coding question - 1/25/2018 6:27:27 AM   
michaelm75au


Posts: 13500
Joined: 5/5/2001
From: Melbourne, Australia
Status: offline
Free thought suggestion:
You can check the units assigned list to the mission SE_GetMission(..).unitlist
Check the time in the air by using unit.airbornetime (to see if flying) and unit.unitstate (to see if already RTBing)

_____________________________

Michael

(in reply to vettim89)
Post #: 2
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Event coding question Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

2.375