User Tools

Site Tools


4rpl:commands:setunittargetoffset

Index

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

Index

4rpl/commands/setunittargetoffset.txt · Last modified: 2021/01/24 14:33 by Sanian