Module CleanUp
The CLEANUP class keeps an area clean of crashing or colliding airplanes.
It also prevents airplanes from firing within this area.
Global(s)
| CLEANUP |
Type CLEANUP
| CLEANUP.ClassName | |
| CLEANUP.CleanUpList | |
| CLEANUP.CleanUpScheduler | |
| CLEANUP:New(ZoneNames, TimeInterval) |
Creates the main object which is handling the cleaning of the debris within the given Zone Names. |
| CLEANUP.TimeInterval | |
| CLEANUP.ZoneNames | |
| CLEANUP:_AddForCleanUp(CleanUpUnit, CleanUpUnitName) |
Add the DCSWrapper.Unit#Unit to the CleanUpList for CleanUp. |
| CLEANUP:_CleanUpScheduler() |
At the defined time interval, CleanUp the Groups within the CleanUpList. |
| CLEANUP:_DestroyGroup(GroupObject, CleanUpGroupName) |
Destroys a group from the simulator, but checks first if it is still existing! |
| CLEANUP:_DestroyMissile(MissileObject) | |
| CLEANUP:_DestroyUnit(CleanUpUnit, CleanUpUnitName) |
Destroys a DCSWrapper.Unit#Unit from the simulator, but checks first if it is still existing! |
| CLEANUP:_EventAddForCleanUp(event, Event) |
Detects if the Unit has an SEVENTENGINESHUTDOWN or an SEVENT_HIT within the given ZoneNames. |
| CLEANUP:_EventCrash(event, Event) |
Detects if a crash event occurs. |
| CLEANUP:_EventHitCleanUp(event, Event) |
Detects if the Unit has an SEVENTHIT within the given ZoneNames. |
| CLEANUP:_EventShot(event, Event) |
Detects if a unit shoots a missile. |
| CLEANUP:_OnEventBirth(EventData) |
Global(s)
Type CleanUp
Type CLEANUP
The CLEANUP class.
Field(s)
- #string CLEANUP.ClassName
- CLEANUP:New(ZoneNames, TimeInterval)
-
Creates the main object which is handling the cleaning of the debris within the given Zone Names.
Parameters
-
#table ZoneNames: Is a table of zone names where the debris should be cleaned. Also a single string can be passed with one zone name. -
#number TimeInterval: The interval in seconds when the clean activity takes place. The default is 300 seconds, thus every 5 minutes.
Return value
Usage:
-- Clean these Zones. CleanUpAirports = CLEANUP:New( { 'CLEAN Tbilisi', 'CLEAN Kutaisi' }, 150 ) or CleanUpTbilisi = CLEANUP:New( 'CLEAN Tbilisi', 150 ) CleanUpKutaisi = CLEANUP:New( 'CLEAN Kutaisi', 600 ) -
- CLEANUP:_AddForCleanUp(CleanUpUnit, CleanUpUnitName)
-
Add the DCSWrapper.Unit#Unit to the CleanUpList for CleanUp.
Parameters
-
CleanUpUnit: -
CleanUpUnitName:
-
- CLEANUP:_CleanUpScheduler()
-
At the defined time interval, CleanUp the Groups within the CleanUpList.
- CLEANUP:_DestroyGroup(GroupObject, CleanUpGroupName)
-
Destroys a group from the simulator, but checks first if it is still existing!
Parameters
-
Dcs.DCSWrapper.Group#Group GroupObject: The object to be destroyed. -
#string CleanUpGroupName: The groupname...
-
- CLEANUP:_DestroyMissile(MissileObject)
-
TODO check Dcs.DCSTypes#Weapon - Destroys a missile from the simulator, but checks first if it is still existing! @param #CLEANUP self @param Dcs.DCSTypes#Weapon MissileObject
Parameter
-
MissileObject:
-
- CLEANUP:_DestroyUnit(CleanUpUnit, CleanUpUnitName)
-
Destroys a DCSWrapper.Unit#Unit from the simulator, but checks first if it is still existing!
Parameters
-
Dcs.DCSWrapper.Unit#Unit CleanUpUnit: The object to be destroyed. -
#string CleanUpUnitName: The Unit name ...
-
- CLEANUP:_EventAddForCleanUp(event, Event)
-
Detects if the Unit has an SEVENTENGINESHUTDOWN or an SEVENT_HIT within the given ZoneNames.
If this is the case, add the Group to the CLEANUP List.
Parameters
-
Dcs.DCSTypes#Event event: -
Event:
-
- CLEANUP:_EventCrash(event, Event)
-
Detects if a crash event occurs.
Crashed units go into a CleanUpList for removal.
Parameters
-
Dcs.DCSTypes#Event event: -
Event:
-
- CLEANUP:_EventHitCleanUp(event, Event)
-
Detects if the Unit has an SEVENTHIT within the given ZoneNames.
If this is the case, destroy the unit.
Parameters
-
Dcs.DCSTypes#Event event: -
Event:
-
- CLEANUP:_EventShot(event, Event)
-
Detects if a unit shoots a missile.
If this occurs within one of the zones, then the weapon used must be destroyed.
Parameters
-
Dcs.DCSTypes#Event event: -
Event:
-
- CLEANUP:_OnEventBirth(EventData)
-
Parameter
-
Core.Event#EVENTDATA EventData:
-