File size: 3,680 Bytes
b6a38d7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# Selection reference
## GetCursorObjSel
Returns the closest object to the specified screen position or to the current position of the cursor.
The objects which are tested are from the specified list.
object **GetCursorObjSel**(point screen_pos, table objects, [bool test_walkables])
point screen_pos
: Screen position. Game cursor by default.
table objects
: list of objects to be tested
bool test_walkables
: test objects walkable surfaces (false by default)
_returns_ object
: the object on the specified screen position
## GetPreciseCursorObj
Get the solid and transparent objects with efSelectable enum flag below the cursor. Parent objects are returned when the objects are attached.
object, object **GetPreciseCursorObj**()
_returns_ object, object
: the first object is the solid object below the cursor, the second object is a transparent object (dome glass) or the first object.
## GetTerrainCursor
Returns the point on the terrain where the cursor points currently.
point **GetTerrainCursor**([int border])
int border
: shrink terrain bounds (0 by default)
_returns_ point
: the terrain point where the cursor points currently clamped in the shrinked bounds.
## GetTerrainCursorObj
Get the closest object to the specified screen position or current position of the cursor.
object **GetTerrainCursorObj**([point screen_pos])
point screen_pos
: Screen position. Game cursor by default.
_returns_ object
: the object on the specified screen position
## GetTerrainCursorObjSel
Get the closest object with efSelectable enum flag to the specified screen position or current position of the cursor.
object **GetTerrainCursorObjSel**([point screen_pos])
point screen_pos
: Screen position. Game cursor by default.
_returns_ object
: the object on the specified screen position
## GetTerrainCursorXY
Returns the point on the terrain on the specified screen position.
point **GetTerrainCursorXY**(point screen_pos, [int border])
point screen_pos
: screen position
int border
: shrink terrain bounds (0 by default)
_returns_ point
: point on the terrain on the specified screen position clamped in the shrinked bounds.
## GetTerrainGamepadCursor
Returns the point on the terrain where the gamepad cursor points currently.
point **GetTerrainGamepadCursor**([int border])
int border
: shrink terrain bounds (0 by default).
_returns_ point
: the terrain point where the gamepad cursor points currently clamped in the shrinked bounds.
## SelectObj
Select object in the game. Clear the current selection if no object is passed.
void **SelectObj**(object obj)
## SelectionGamepadObj
Gets the object that would be selected on the current gamepad position by default.
Also returns the original selected object without selection propagation.
object, object **SelectionGamepadObj**()
## SelectionMouseObj
Gets the object that would be selected on the current mouse cursor position by default.
Also returns the original selected object without selection propagation.
object, object **SelectionMouseObj**()
## SelectionPropagate
Gets the parent or another associated selectable object or the object itself
object **SelectionPropagate**(object obj)
## ViewAndSelectObject
Select object in the game and points the camera towards it.
void **ViewAndSelectObject**(object obj)
(insert footer.md.html here)
<link rel="stylesheet" type="text/css" href="Style.css" />
<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.min.js" charset="utf-8"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script> |