This trigger will be fired when target's (it could be ranged from all units of side to specific unit) current status changed to desired condition.
Currently this trigger is not configuable via Event Editor (hope it could be done soon) and requires ScenEdit_SetTrigger() function.
Here is my code:
Code: Select all
local trigger = "Blue_AircraftLands"
local TargetFilter={
TargetSide= 'Blue',
TargetType= "Aircraft",
TargetSubType= nil,
SpecificUnitClass= nil,
SpecificUnitID= nil,
}
local TargetCondition= 6
local trigger = ScenEdit_SetTrigger({mode="update", name=trigger, type="UnitBaseStatus",
TargetFilter=TargetFilter, TargetCondition=TargetCondition})
print(trigger)"TargetCondition" (Lua Docs incorrectly says "TargetStatus" but I got error for this) specifies target's desired status. I only checked for aircrafts but I could find following values:
0 = Airborne
1 = Parked (Ready)
2 = Taxiing to take off
3 = Taxiing to parking spot
4 = Taking off
5 = On final approach
6 = Completing landing
7 = Readying
Possible event I came up with using this trigger is "Belenko landed to Hakodate Airport", "Cancel aircraft's taking off under bad weather" or "Automatically change aircraft loadout after landing".
Hope this post helps.