Difference between revisions of "DCS func createInfraRed"

From DCS World Wiki - Hoggitworld.com
m (1 revision imported)
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
|fName= createInfraRed
 
|fName= createInfraRed
  
|vNum= 1.2.0
+
|vNum= 1.2.6
  
 
|par1= [[DCS_Class_Spot| Spot]]
 
|par1= [[DCS_Class_Spot| Spot]]
Line 13: Line 13:
 
|par4=
 
|par4=
  
|desc= Creates a laser ray emanating from the given object to a point in 3d space.  
+
|desc= Creates an infrared ray emanating from the given object to a point in 3d space. Can be seen with night vision goggles.  
  
 
localRef is technically an optional variable, however the functions format requires an entry to be made. If not used, simply replace with nil
 
localRef is technically an optional variable, however the functions format requires an entry to be made. If not used, simply replace with nil
  
If optional variable laserCode is not present the beam will automatically be set to a IR beam. If laserCode is specified the beam is a laser which can be used to guide laser guided bombs.
 
 
Laser code is any 4 digit number between 1111 and 1788.
 
  
 
|rtnType= [[DCS_Class_Spot|Spot Object]]
 
|rtnType= [[DCS_Class_Spot|Spot Object]]
Line 39: Line 36:
 
|reqType4=
 
|reqType4=
  
|optType1= number
+
|optType1=  
  
|optName1= laseCode
+
|optName1=  
  
 
|optType2=
 
|optType2=
Line 48: Line 45:
 
[[DCS_Class_Spot|'''Spot Functions:''']] {{listofScriptingSpotFuncs}}
 
[[DCS_Class_Spot|'''Spot Functions:''']] {{listofScriptingSpotFuncs}}
  
|examples= The following will create a laser emitting 1 meter above the jtac unit toward the targeted group. The laser code is 1337.  
+
|examples= The following will create a laser emitting 1 meter above the jtac unit toward the targeted group.  
  
 
  local jtac = Unit.getByName('jtacBob')
 
  local jtac = Unit.getByName('jtacBob')
 
  local target = Unit.getByName('BMPAirDefenseSystemGroup1_unit1'):getPoint()
 
  local target = Unit.getByName('BMPAirDefenseSystemGroup1_unit1'):getPoint()
 
   
 
   
  local ray = Spot.createInfraRed(jtac, {x = 0, y = 1, z = 0}, target, 1337)
+
  local ray = Spot.createInfraRed(jtac, {x = 0, y = 1, z = 0}, target)
 
|notes=
 
|notes=
 
}}
 
}}
 
[[Category:Class Functions|createInfraRed]]
 
[[Category:Class Functions|createInfraRed]]
 +
[[Category:Game Patch 1.2.6|createInfraRed]]

Latest revision as of 23:02, 17 March 2022

Scripting Root

Envrioment: Mission Scripting
Function: createInfraRed Added with: 1.2.6
Member Of: Spot
Syntax: Spot Object Spot.createInfraRed(Object Source , Vec3 localRef , Vec3 point )
Description: Creates an infrared ray emanating from the given object to a point in 3d space. Can be seen with night vision goggles.

localRef is technically an optional variable, however the functions format requires an entry to be made. If not used, simply replace with nil


Return Value: Spot Object
Return Example:
Examples: The following will create a laser emitting 1 meter above the jtac unit toward the targeted group.
local jtac = Unit.getByName('jtacBob')
local target = Unit.getByName('BMPAirDefenseSystemGroup1_unit1'):getPoint()

local ray = Spot.createInfraRed(jtac, {x = 0, y = 1, z = 0}, target)
Related Functions: Spot Functions: createLaser. createInfraRed, destroy, getCategory, getPoint, setPoint, getCode, setCode
Notes: