Osiris/API/FindValidPosition: Difference between revisions
Jump to navigation
Jump to search
(Created page with "===== Full Definition(s) ===== * call '''FindValidPosition'''('''[in]'''''(REAL)'''''_sourceX''', '''[in]'''''(REAL)'''''_sourceY''', '''[in]'''''(REAL)'''''_sourceZ''', '''[i...") |
(call -> query, put into standard template form) |
||
Line 1: | Line 1: | ||
===== Full Definition(s) ===== | ===== Full Definition(s) ===== | ||
* call '''FindValidPosition'''('''[in] | * call '''FindValidPosition'''('''''[in]'''(REAL)'''''_SourceX''', '''''[in]'''(REAL)'''''_SourceY''', '''''[in]'''(REAL)'''''_SourceZ''', '''''[in]'''(REAL)'''''_Radius''', '''''[in]'''(GUIDSTRING)'''''_Object''', '''''[out]'''(REAL)'''''_ValidPositionX''', '''''[out]'''(REAL)'''''_ValidPositionY''', '''''[out]'''(REAL)'''''_ValidPositionZ''') | ||
===== Description ===== | ===== Description ===== | ||
Finds a valid position for a | Finds a valid position for an object on the AI-grid near a source position using a floodfill up to a specified radius. If '''_Object''' is non-null and an item or a character, the returned position will have enough space to fit its AI-bounds, and the object itself will be ignored while looking for a new valid position (if you look for a new position for a giant object one metre from its current position, the object would "collide" with itself when placed at that position it were not ignored). | ||
===== Return Values ===== | |||
* '''Success/Failure''': Fails if there no currently active level, or if no valid position could be found within the requested radious. | |||
* '''_ValidPositionX''': X-coordinate of the found position. | |||
* '''_ValidPositionY''': Y-coordinate of the found position. | |||
* '''_ValidPositionZ''': Z-coordinate of the found position. | |||
===== Notes ===== | |||
* / | |||
===== See Also ===== | |||
* [[Osiris/API/CharacterMoveToPosition|CharacterMoveToPosition]] | |||
* [[Osiris/API/ItemMoveToPosition|ItemMoveToPosition]] | |||
* [[Osiris/API/ItemToTransform|ItemToTransform]] | |||
* [[Osiris/API/TeleportToPosition|TeleportToPosition]] | |||
[[Category:Osiris Queries|FindValidPosition]] | [[Category:Osiris Queries|FindValidPosition]] | ||
[[Category:Osiris Queries (Added in DOS2DE)|FindValidPosition]] | [[Category:Osiris Queries (Added in DOS2DE)|FindValidPosition]] |
Revision as of 20:26, 13 September 2018
Full Definition(s)
- call FindValidPosition([in](REAL)_SourceX, [in](REAL)_SourceY, [in](REAL)_SourceZ, [in](REAL)_Radius, [in](GUIDSTRING)_Object, [out](REAL)_ValidPositionX, [out](REAL)_ValidPositionY, [out](REAL)_ValidPositionZ)
Description
Finds a valid position for an object on the AI-grid near a source position using a floodfill up to a specified radius. If _Object is non-null and an item or a character, the returned position will have enough space to fit its AI-bounds, and the object itself will be ignored while looking for a new valid position (if you look for a new position for a giant object one metre from its current position, the object would "collide" with itself when placed at that position it were not ignored).
Return Values
- Success/Failure: Fails if there no currently active level, or if no valid position could be found within the requested radious.
- _ValidPositionX: X-coordinate of the found position.
- _ValidPositionY: Y-coordinate of the found position.
- _ValidPositionZ: Z-coordinate of the found position.
Notes
- /