| Envrioment:
|
Mission Scripting
|
|
|
| Function:
|
removeJunk
|
Added with: 2.8.4
|
|
|
| Member Of:
|
world
|
| Syntax:
|
number world.removeJunk(volume searchVolume )
|
| Description:
|
Searches the defined area passed to the function to remove craters, object wreckage and any other debris within the search volume. Will not remove wreckage of scenery objects.
|
|
|
| Return Value:
|
number
|
| Return Example:
|
420
|
|
|
| Examples:
|
The following will remove wreckage, craters, and debris in the zone "trainingAirbase" where there surely will be wreckage, craters, and debris due to skill issues.
local sphere = trigger.misc.getZone('trainingAirbase')
sphere.point.y = land.getHeight({x = spehere.point.x, y = sphere.point.z})
local volS = {
id = world.VolumeType.SPHERE,
params = {
point = sphere.point,
radius = sphere.radius
}
}
world.removeJunk(sphere)
|
| Related Functions:
|
World Functions: addEventHandler, removeEventHandler, getPlayer, getAirbases, searchObjects, getMarkPanels, removeJunk
world.weather
getFogThickness, setFogThickness,
getFogVisibilityDistance, setFogVisibilityDistance, setFogAnimation
|
| Notes:
|
At the time of implementation the AI DO NOT react to craters being removed from an airbase by this function. They still wait the 1 hour after a crater was generated for it to be "repaired" and will resume using an airbase once all craters are repaired.
|