MIST teleportInZone

From DCS World Wiki - Hoggitworld.com


Added with: Mist 3.0
Teleports a group of the name groupName to a randomized point within a trigger zone. Teleports the group in its current condition. Destroyed vehicles will stay dead
string mist.teleportInZone(string groupName ,string/table zoneName/tableOfZoneNames , boolean disperse ,number radius )
Valid Input Values:
groupName= name of the group that is to be teleported inside a zone

zoneName= Name of the zone as placed in the editor to that the group will randomly spawn inside of.


tableOfZoneNames= If numerous zone names are given, a single zone will be chosen at random for the group to spawn inside of.

disperse= if this variable is present each unit of the group will be randomly dispersed in the zone. If not present, the group will remain in its default formation

radius= if this variable is present in addition to disperse, this radius will specify the maximum distance each unit will be from the first unit of the group.

Return value:
Return example:
string of group's name
Usage Examples:
The following code will teleport a group to a random zone
    mist.teleportInZone('S300', {'myZone1', 'myZone2'}, true, 300)
As of mist 3.3 this function supports the use of static objects.

This function limits where groups of certain types can spawn. Ground groups can only spawn on the ground and roads. Ships can only spawn on water. And aircraft can be spawned anywhere. Note that for ground groups any part of the airbase like the runway, ramp, or taxiway is not a valid spawning location. This is done so ground units won't accidentally block AI aircraft paths when at an airbase.

Related Functions
dynAdd, dynAddStatic, groupTableCheck, getNextUnitId, getNextGroupId, respawnGroup, respawnInZone, cloneGroup, cloneInZone, teleportGroup, teleportInZone, teleportToPoint, spawnRandomizedGroup

Scripting Engine

MIST Root Page