MIST respawnInZone

From DCS World Wiki - Hoggitworld.com


Added with: Mist 3.0
Respawns a group of the name groupName to a randomized point within a trigger zone.
string mist.respawnInZone(string groupName ,string/table zoneName/tableOfZoneNames , boolean disperse ,number radius )
Valid Input Values:
groupName= name of the group that is to respawn 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 respawn a group randomly in a zone once it is has died.

 if (Group.getByName('groupName') and Group.getByName('groupName'):getSize() < 1) or not Group.getByName('groupName') then
   mist.respawnInZone('groupName', 'myZone', true, 500)

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