cursorTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
(note section formatted)
Line 35: Line 35:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->


<dt class="note">'''[[GLT Myke]]''' 01:25, 18 February 2011 (CET)
<dd class="notedate">Posted on  01:25, 18 February 2011 (CET)
<dt class="note">'''[[GLT Myke]]'''
<dd class="note">
<dd class="note">
If the player is in a vehicle and a lockable weapon is selected and a target is locked, the locked target will be returned, regardless if it's in sight or not.
If the player is in a vehicle and a lockable weapon is selected and a target is locked, the locked target will be returned, regardless if it's in sight or not.


 
<dd class="notedate">Posted on 11 March 2011
<dt class="note">'''[[User:kju|kju]]''' 11 March 2011
<dt class="note">'''[[User:kju|kju]]'''  
<dd class="note">
<dd class="note">
Addition to Myke's note:
Addition to Myke's note:
Line 46: Line 47:
Only the lock cursor must be visible on the target - not a full lock necessarily.
Only the lock cursor must be visible on the target - not a full lock necessarily.


 
<dd class="notedate">Posted on 13:09, 11 July 2009 (CEST)
<dt class="note">'''[[User:Lou Montana|Lou Montana]]''' 13:09, 11 July 2009 (CEST)
<dt class="note">'''[[User:Lou Montana|Lou Montana]]'''
<dd class="note">
<dd class="note">
*Player must [[knowsAbout|knows about]] what he is pointing to for this command to return something other than <NULL-OBJECT>
*Player must [[knowsAbout|knows about]] what he is pointing to for this command to return something other than <NULL-OBJECT>
Line 53: Line 54:
*This recognition doesn't work with every object : soldiers, vehicles, big houses are ok, but not trees, plants, road signs or others little things
*This recognition doesn't work with every object : soldiers, vehicles, big houses are ok, but not trees, plants, road signs or others little things


<dt class="note">'''[[User:Killzone_Kid|Killzone_Kid]]''' 22:11, 23 August 2013 (CEST)
<dd class="notedate"> 22:11, 23 August 2013 (CEST)
<dt class="note">'''[[User:Killzone_Kid|Killzone_Kid]]'''
<dd class="note">
<dd class="note">
To add to Lou Montana's note, use [[reveal]] command on the object you want to be detected with [[cursorTarget]] when pointing at it. Without it, distant units are most likely to return [[objNull]] even if you shoot and hit them.
To add to Lou Montana's note, use [[reveal]] command on the object you want to be detected with [[cursorTarget]] when pointing at it. Without it, distant units are most likely to return [[objNull]] even if you shoot and hit them.<br><br>Units that have been previously subjected to [[enableSimulation]] false; or [[enableSimulationGlobal]] false; may stay unrecognised for a long time even after simulation was re-enabled, returning [[objNull]] as [[cursorTarget]]. Force revealing units with [[reveal]] command usually solves the problem. For example: <code>{[[player]] [[reveal]] _x} [[forEach]] [[allUnits]];</code>




<!-- Note Section END -->
<!-- Note Section END -->
</dd>
</dl>
</dl>
<h3 style='display:none'>Bottom Section</h3>
<h3 style='display:none'>Bottom Section</h3>
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]

Revision as of 17:43, 21 October 2014

Hover & click on the images for description

Description

Description:
This is the entity pointed to by a players cursor.
Groups:
Uncategorised

Syntax

Syntax:
cursorTarget
Return Value:
Object

Examples

Example 1:
alive cursorTarget

Additional Information

See also:
laserTargetnearTargetsknowsAbout

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

Notes

Posted on 01:25, 18 February 2011 (CET)
GLT Myke
If the player is in a vehicle and a lockable weapon is selected and a target is locked, the locked target will be returned, regardless if it's in sight or not.
Posted on 11 March 2011
kju
Addition to Myke's note: It also works for infantry with launchers that canLock, like Javelin or AA. Only the lock cursor must be visible on the target - not a full lock necessarily.
Posted on 13:09, 11 July 2009 (CEST)
Lou Montana
  • Player must knows about what he is pointing to for this command to return something other than <NULL-OBJECT>
  • This command doesn't work through building windows
  • This recognition doesn't work with every object : soldiers, vehicles, big houses are ok, but not trees, plants, road signs or others little things
22:11, 23 August 2013 (CEST)
Killzone_Kid
To add to Lou Montana's note, use reveal command on the object you want to be detected with cursorTarget when pointing at it. Without it, distant units are most likely to return objNull even if you shoot and hit them.

Units that have been previously subjected to enableSimulation false; or enableSimulationGlobal false; may stay unrecognised for a long time even after simulation was re-enabled, returning objNull as cursorTarget. Force revealing units with reveal command usually solves the problem. For example: {player reveal _x} forEach allUnits;

Bottom Section