User Tools

Site Tools


4rpl:commands:setunitspecifiedtarget

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
4rpl:commands:setunitspecifiedtarget [2024/01/14 22:11] – [Description] Minor Note on Integers durikkan4rpl:commands:setunitspecifiedtarget [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 14: Line 14:
 Sets a unit's specified target location. The specified target is a map cell location that is set either by player interaction or by script. Sets a unit's specified target location. The specified target is a map cell location that is set either by player interaction or by script.
  
-The value to set is a vector consisting of three coordinates.  The map position is in the X and Z locations. The Y-value/2nd vector of this V3 is ignored but still needs to "exist" so you can't use only V2 as the 2nd vector of the V2 will be placed in the Y-vector of the V3 only to then be ignored, causing a V3 of (X 0). To avoid thiseither use a V3 like in the example or organize a V3 like so: "V3(<-X <-Z)" or "V3(<-.x 0 <-.z)". You can not directly input V2 into this API because of this need of organizing the stack around the Y-value vector.+''<-pos'' must be V3, despite the Y location being completely unused. It expects the vector to be this: ''V3(<-X 0 <-Z)'', so if your input is this; ''V2(<-X <-Z)'' the Z value will be read incorrectly. You may easily "convertvectors as such: ''V3(swap(EV2(<-vector) 0))'' or ''EV2 0 swap V3'' or ''<-vector.y ->vector.z'' If you are converting two ints into a V3, (like what [[GetUnitCell]] returns,simply push 0 and [[swap]].
  
 ---- ----
4rpl/commands/setunitspecifiedtarget.1705270284.txt.gz · Last modified: 2025/02/14 14:56 (external edit)