getCursorObjectParams: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Command|= Comments ____________________________________________________________________________________________ |arma3dev|= Game name |1.69|= Game version ________________...")
 
m (Text replacement - "<code>\[\[([a-zA-Z0-9_]+)\]\] +\[\[([a-zA-Z0-9_]+)\]\] +\[\[([a-zA-Z0-9_]+)\]\];?<\/code>" to "<sqf>$1 $2 $3;</sqf>")
 
(32 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


|arma3dev|= Game name
|game1= arma3
|version1= 1.70


|1.69|= Game version
|gr1= Object Detection
____________________________________________________________________________________________


| Returns the object under cursor, named selection pointed at as well as distance to the object. |= Description
|descr= Returns object and named selections under cursor and distance to object's surface (to the point cursor points at). If object surface is further away than 50 meters, selections are always an empty array and distance is 1e10 (10^10).
____________________________________________________________________________________________


| '''getCursorObjectParams''' |= Syntax
|s1= '''getCursorObjectParams'''


| [[Array]] - [cursorObject, cursorObjectNamedSel, distToCursorObject] |= RETURNVALUE
|r1= [[Array]] - [cursorObject, selections, distance]


|x1= <sqf>hint str getCursorObjectParams;</sqf>


|x1= <code>[[hint]] [[str]] [[getCursorObjectParams]];</code>|= EXAMPLE1
|seealso= [[cursorObject]] [[cursorTarget]]
 
____________________________________________________________________________________________
 
| [[cursorObject]], [[cursorTarget]]|= SEEALSO
 
|  |= MPBEHAVIOUR
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]

Latest revision as of 15:10, 5 May 2022

Hover & click on the images for description

Description

Description:
Returns object and named selections under cursor and distance to object's surface (to the point cursor points at). If object surface is further away than 50 meters, selections are always an empty array and distance is 1e10 (10^10).
Groups:
Object Detection

Syntax

Syntax:
getCursorObjectParams
Return Value:
Array - [cursorObject, selections, distance]

Examples

Example 1:
hint str getCursorObjectParams;

Additional Information

See also:
cursorObject cursorTarget

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