Difference between revisions of "DCS func setSpeed"

From DCS World Wiki - Hoggitworld.com
(Created page with "{{Template:dcs_funcs |fName= setSpeed |vNum= 2.7.11 |par1= Controller |par2= |desc= Sets the controlled group to go the specified speed in meter...")
 
 
Line 42: Line 42:
 
|examples= The following will set the tanker to fly slower at a speed an A-10 can achieve.  
 
|examples= The following will set the tanker to fly slower at a speed an A-10 can achieve.  
  
     Group.getByName("KC-135"):getController:setSpeed(125)
+
     Group.getByName("KC-135"):getController():setSpeed(125)
  
 
|notes=  
 
|notes=  

Latest revision as of 22:01, 13 October 2022

Scripting Root

Envrioment: Mission Scripting
Function: setSpeed Added with: 2.7.11
Member Of: Controller
Syntax: function Controller.setSpeed(Class self , number speed , boolean keep)
Description: Sets the controlled group to go the specified speed in meters per second.

Optional boolean keep when set to true will maintain that speed on passing waypoints. If no present or false the controlled group will return to the speed as defined by their route.


Return Value: function
Return Example: none
Examples: The following will set the tanker to fly slower at a speed an A-10 can achieve.
   Group.getByName("KC-135"):getController():setSpeed(125)
Related Functions: Controller: setTask, resetTask, pushTask, popTask, hasTask, setCommand, setOption, setOnOff, setAltitude, setSpeed, knowTarget, isTargetDetected, getDetectedTargets
Notes: