MIST teleportToPoint

From DCS World Wiki - Hoggitworld.com
Revision as of 05:02, 29 May 2018 by Grimes (talk | contribs)


mist.teleportToPoint

Added with: Mist 3.0
Description
Respawns/Clones/Teleports an group to a point and within a randomized radius of the point.
Syntax
string mist.teleportToPoint(table vars )
Valid Input Values:

vars tables have the following recognized fields( required entries in blue, optional in green):

 vars = 
 {
 groupName = string groupName, 
 point = table point, 
 action = string action,
 disperse = boolean disperse, 
 maxDisp = number maxDisp, 
 radius = number radius, 
 innerRadius = number innerRadius, 
 route = table route,
 }

groupName is the name of the group the function will teleport

point is a vec3 coordinate that designates where the group will spawn

action is a string value which defines the what is done to the group. valid entries are:

'teleport' : Teleports the group in its current state (dead units will not respawn) 
'respawn' : respawns the group
'clone' : creates a copy of the group

disperse is an optional variable that if present each unit of the group will spawn at a random location.

maxDisp is an optional variable that defines how far each unit will be from each other.

radius is an optional variable that defines the max distance from the point that a group can spawn from

innerRadius is an optional variable that defines the minimum distance from the point that the group can spawn from

route is an optional variable that defines the route assigned to the group

Return value:
string
Return example:
string of group's name
Usage Examples:
  local vars = {} 
  vars.gpName = ‘group1’ 
  vars.action = 'clone' 
  vars.point = vec3 
  vars.radius = 1000 
  vars.disperse = ‘disp’ 
  vars.maxDisp = 500 
  mist.teleportToPoint(vars) 
Notes:
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