laserTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Fixed notes)
m (Some wiki formatting)
 
(42 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2oa |= Game name
|game1= arma2oa
|version1= 1.50


|1.51|= Game version
|game2= tkoh
|version2= 1.00


|arg= local |= Arguments in MP
|game3= arma3
____________________________________________________________________________________________
|version3= 0.50


| Returns target created by given unit (gunner in vehicle or on foot). |= Description
|arg= global
____________________________________________________________________________________________


| '''laserTarget''' unitName|= Syntax
|gr1= Weapons


|p1= unitName: [[Object]] |=  
|descr= Returns the laser target object created by given unit (vehicle or soldier) when using a laser targeting device. The main syntax targets the primary gunner turret.


| [[Object]] |= Return value
|s1= [[laserTarget]] entity
____________________________________________________________________________________________


|x1= <code>_target <nowiki>=</nowiki> '''laserTarget''' gunner heli; </code> |=
|p1= entity: [[Object]] - unit or vehicle
|x2= <code>_designatedPos <nowiki>=</nowiki> [[position]] '''laserTarget''' player; </code> |=
____________________________________________________________________________________________


| [[cursorTarget]] |= See also
|r1= [[Object]] - laser target or [[objNull]] if no laser target exists


}}
|s2= vehicle [[laserTarget]] turret
 
|s2since= arma3 2.12
 
|p21= vehicle: [[Object]] - transport


<dl class="command_description">
|p22= turret: [[Array]] format [[Turret Path]]
<dd class="notedate">Posted on December 15, 2010 - 11:14 (UTC)</dd>
<dt class="note">[[User:Tom 48 97|tom_48_97]]</dt>
<dd class="note">
Need to be try with a soldier and laser designator
</dd>
</dl>


<dl class="command_description">
|r2= [[Object]] - laser target or [[objNull]] if no laser target exists
<dd class="notedate">Posted on December 19, 2010 - 06:10 (UTC)</dd>
<dt class="note">[[User:DarkWanderer|DarkWanderer]]</dt>
<dd class="note">
Works with either infantry or vehicles. Returns [[objNull]] if no target is present
</dd>
</dl>


<dl class="command_description">
|x1= <sqf>private _target = laserTarget gunner heli;</sqf>
<dd class="notedate">Posted on August 17, 2012 - 18:52 (UTC)</dd>
<dt class="note">[[User:Franze|Franze]]</dt>
<dd class="note">
You can only get a unit's lasertarget if it is local to you.
</dd>
</dl>


<h3 style="display:none">Bottom Section</h3>
|x2= <sqf>private _designatedPos = getPosATL laserTarget player;</sqf>


[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
|seealso= [[isLaserOn]] [[cursorTarget]] [[setMissileTarget]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:ArmA 2 OA: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]

Latest revision as of 21:11, 29 August 2022

Hover & click on the images for description

Description

Description:
Returns the laser target object created by given unit (vehicle or soldier) when using a laser targeting device. The main syntax targets the primary gunner turret.
Groups:
Weapons

Syntax

Syntax:
laserTarget entity
Parameters:
entity: Object - unit or vehicle
Return Value:
Object - laser target or objNull if no laser target exists

Alternative Syntax

Syntax:
vehicle laserTarget turret
Parameters:
vehicle: Object - transport
turret: Array format Turret Path
Return Value:
Object - laser target or objNull if no laser target exists

Examples

Example 1:
private _target = laserTarget gunner heli;
Example 2:
private _designatedPos = getPosATL laserTarget player;

Additional Information

See also:
isLaserOn cursorTarget setMissileTarget

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note