This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
4rpl:commands:getunitposition [2022/06/19 12:22] – [Description] Karsten75 | 4rpl:commands:getunitposition [2022/07/16 12:55] – Noted V2.4 change. Karsten75 | ||
---|---|---|---|
Line 15: | Line 15: | ||
Note: If this call is attempted on an non-existing unit, nothing will be put on the stack. | Note: If this call is attempted on an non-existing unit, nothing will be put on the stack. | ||
+ | In V 2.4, this behavior changes and this API will now return V3(0 0 0), similar to other APIs. | ||
===== Examples ===== | ===== Examples ===== | ||
Line 20: | Line 21: | ||
GetUnitPosition(< | GetUnitPosition(< | ||
</ | </ | ||
+ | |||
+ | |||
+ | A " | ||
+ | |||
+ | <code 4rpl> | ||
+ | Trace (@UnitPos(7) ) | ||
+ | |||
+ | :unitPos | ||
+ | StackSize ->size | ||
+ | GetUnitPosition | ||
+ | If (Stacksize <-size NEQ) | ||
+ | V3(-1 -1 -1) | ||
+ | endif | ||
+ | </ | ||
+ | |||
< | < | ||