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:New(ZoneNames, TimeInterval)
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(Event)

Global(s)

#CLEANUP CLEANUP

Type CleanUp

Type CLEANUP

The CLEANUP class.

Field(s)

#string CLEANUP.ClassName
CLEANUP.CleanUpList
CLEANUP:New(ZoneNames, TimeInterval)

Parameters

  • ZoneNames :

  • TimeInterval :

#number CLEANUP.TimeInterval
CLEANUP.ZoneNames
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

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

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

CLEANUP:_EventCrash(event, Event)

Detects if a crash event occurs.

Crashed units go into a CleanUpList for removal.

Parameters

CLEANUP:_EventHitCleanUp(event, Event)

Detects if the Unit has an SEVENTHIT within the given ZoneNames.

If this is the case, destroy the unit.

Parameters

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

CLEANUP:_OnEventBirth(Event)

Parameter

  • Event :