LuaDoc_Selection.md.html - yasumitsu/JaggedAlliance3Modding GitHub Wiki
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
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.
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.
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
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
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.
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.
Select object in the game. Clear the current selection if no object is passed.
void SelectObj(object obj)
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()
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()
Gets the parent or another associated selectable object or the object itself
object SelectionPropagate(object obj)
Select object in the game and points the camera towards it.
void ViewAndSelectObject(object obj)
(insert footer.md.html here)
<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>