- Opcode: 0x03E
- Short name: MOVE
- Long name: Move
Argument
none
Stack
X position
Y position
Z position
Movement angle
MOVE
Description
Make this entity walk/run to the given coordinates. Four values are popped: the top goes into the entity’s movement-angle field (move_angle_current, entity+538); the next three are the destination X, Y, Z, stored as fixed-point world coordinates (move_pos_x/y/z, entity+436/+440/+444, shifted left by 12). The handler sets motion_state (entity+572) to 1 (linear move) and compares the move speed (set by MSPEED) against a threshold to select the walk animation (baseanim2) or run animation (baseanim3) registered by BASEANIME. It pauses the script until the entity arrives (motion_substate, entity+542, becomes 2), then restores the idle animation (baseanim1) and returns 2.
PC handler: SCRIPT_MOVE.
Function addresses
| Function | Address | Description |
|---|---|---|
SCRIPT_MOVE | 0x523410 | Field script opcode handler (verified IDA function) |