• Opcode: 0x084
  • Short name: CTURNR
  • Long name: Turn Character

Argument

none

Stack

Angle to face

Duration of turn (frames)

CTURNR

Description

Turns this entity to face an absolute angle over the given number of frames. The handler pops the duration first (byte, stored at entity+578) and the target angle second (word, entity+478); it records the current facing (entity+577) as the start angle (entity+476) and marks the turn active (entity+580 = 2). If the angular distance exceeds 128 (half of the 256-unit circle) it offsets the target by ±256 so the rotation always takes the shorter way around. Returns 1 while turning and 2 once complete.

Note that Final Fantasy 8 uses 256 degree circles. Degrees 0 and 256 are defined as down, 64 right, 128 up, 192 left.

In the PC executable SCRIPT_CTURNR and SCRIPT_CTURNL are byte-for-byte identical: both take the shortest rotational path, so the R/L (right/left) distinction has no effect. For a guaranteed turn direction use CLOCKWISETURN / COUNTERCLOCKWISETURN instead.

PC handler: SCRIPT_CTURNR.

Function addresses

Function Address Description
SCRIPT_CTURNR 0x5273F0 Field script opcode handler (verified IDA function)
SCRIPT_CTURNL 0x5274C0 Byte-for-byte identical handler, see CTURNL