<- CRPL reference <- Movement Commands

GetUnitTargetOffsetX

ArgumentsResultNotation
Unit UID X pixel offset i1 – x1

Description

Allows you to read the x target offset for cores other than this one. Useful for creating custom weapons that may need to hit cores with target offsets. See SetTargetOffsetX and SetTargetOffsetY for details.

Examples

  #Create (targetX and targetY to use for aiming)
<-targetUID CONST_PIXELCOORDX GetUnitAttribute
  <-targetUID GetUnitTargetOffsetX add ->targetX
<-targetUID CONST_PIXELCOORDY GetUnitAttribute
  <-targetUID GetUnitTargetOffsetY add ->targetY