cursorTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<dd class="notedate">Posted on ([^<>]+) " to "<dd class="notedate">Posted on $1</dd> ")
m (Text replacement - "<dt class="note">([^<>]+) " to "<dt class="note">$1</dt> ")
Line 32: Line 32:


<dd class="notedate">Posted on  01:25, 18 February 2011 (CET)</dd>
<dd class="notedate">Posted on  01:25, 18 February 2011 (CET)</dd>
<dt class="note">[[GLT Myke]]
<dt class="note">[[GLT Myke]]</dt>
<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 is 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 is in sight or not.


<dd class="notedate">Posted on 11 March 2011</dd>
<dd class="notedate">Posted on 11 March 2011</dd>
<dt class="note">[[User:kju|kju]]  
<dt class="note">[[User:kju|kju]] </dt>
<dd class="note">
<dd class="note">
Addition to Myke's note:
Addition to Myke's note:
Line 44: Line 44:


<dd class="notedate">Posted on 13:09, 11 July 2009 (CEST)</dd>
<dd class="notedate">Posted on 13:09, 11 July 2009 (CEST)</dd>
<dt class="note">[[User:Lou Montana|Lou Montana]]
<dt class="note">[[User:Lou Montana|Lou Montana]]</dt>
<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 51: Line 51:


<dd class="notedate">Posted on 22:11, 23 August 2013 (CEST)</dd>
<dd class="notedate">Posted on 22:11, 23 August 2013 (CEST)</dd>
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt>
<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.<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>
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>

Revision as of 02:23, 30 January 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Object Detection

Syntax

Syntax:
Syntax needed
Return Value:
Return value needed

Examples

Example 1:
alive cursorTarget;

Additional Information

See also:
See also needed

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
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 is 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
Posted on 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;
Posted on December 3, 2014 - 18:40 (UTC)
DreadedEntity
cursorTarget seems to change when your cursor enters an object's boundingBox. Because of this, if the player is inside the boundingBox, the object will always be the current cursorTarget if the player is not looking at another object, although sometimes the object will remain the cursorTarget even if the player does.
Posted on April 21, 2015 - 02:53 (UTC)
Pierre MGI
Cursortarget will not return enemy units, even very close, if "autoreport" is disabled in game difficulty settings, and if player is alone. However, when enemy units open fire on player, the cursortarget becomes functional on these units. If player is in a group, cursortarget is also functional (report by other units).
Posted on February 5, 2016 - 20:38 (UTC)
Pierre MGI
CursorTarget will return a <Null_Object> for all of thus which have a disabled simulation (_object enableSimulation false).