~~NOTOC~~ <=[[4rpl:start| Index]] * [[4rpl:commands:GetUnitTargetOffset|Get]] * [[4rpl:commands:SetUnitTargetOffset|Set]] ====== SetUnitTargetOffset ====== SetUnitTargetOffset(<-unit <-pos) ===== Description ===== Sets the target offset of a unit. The target offset is the position relative to the unit that the unit should be targeted, or shot at. For instance, if a unit sits on the terrain but has some height, you would want the target offset to be something like (0,1,0) so that units that shoot at the unit fire into the middle of the unit. Typically, the X and Z values are 0 (the center of the unit) and the Y value specifies a height. ===== Examples ===== SetUnitTargetOffset(self V3(0 3 0)) #Indicate this unit should be shot at 3 above the origin of the unit <=[[4rpl:start| Index]]