Changes
Jump to navigation
Jump to search
no edit summary
* Opcode: '''0xC3'''
* Short name: '''OFST'''
* Long name: Offset Object
==== Memory layout ====
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! width="40" | 0xC3
! width="40" | ''0''
! width="40" | ''0''
! width="40" | ''T''
! width="40" | ''X''
! width="40" | ''Y''
! width="40" | ''Z''
! width="40" | ''S''
|}
==== Arguments ====
* '''const UShort''' ''0'': Zero. Has an unusual effect on co-ordinates if non-zero.
* '''const UByte''' ''T'': Type of movement.
* '''const Short''' ''X'': X offset amount, relative to current position.
* '''const Short''' ''Y'': Y offset amount, relative to current position.
* '''const Short''' ''Z'': Z offset amount, relative to current position.
* '''const UShort''' ''S'': Speed of the offset movement, if type is non-zero.
==== Description ====
Offsets the field object, belonging to the entity whose script this opcode resides in, by a certain amount. After being offset, the character moves on the walkmesh as per the walkmesh's shape, but at a certain distance away from the normal walkmesh position. Other field objects are unaffected, and their position or movements are maintained on the walkmesh's original position.
The amount to offset is specified relative to the current position. If '''T'''ype is specified, the object moves gradually from its current point to the offset position; this can be used to simulate movements such as elevators. Any type outside the range in the table will cause the offset not to occur. If the object is set to move gradually, then the speed of offset can be set; the greater the number, the slower the object moves to its target offset.
Script execution may also be halted until the gradual offset has been completed. For this, see [[FF7/Field/Script/Opcodes/C4 OFSTW|OFSTW]].
==== Movement Types ====
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! style="background:rgb(204,204,204)" width="40" | ID
! style="background:rgb(204,204,204)" width="150" | Movement Type
|-
| align="center" | 0
| Instantaneous
|-
| align="center" | 1
| Linear (Point-to-point)
|-
| align="center" | 2
| Quadratic (Smoothed)
|-
|}
* Short name: '''OFST'''
* Long name: Offset Object
==== Memory layout ====
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! width="40" | 0xC3
! width="40" | ''0''
! width="40" | ''0''
! width="40" | ''T''
! width="40" | ''X''
! width="40" | ''Y''
! width="40" | ''Z''
! width="40" | ''S''
|}
==== Arguments ====
* '''const UShort''' ''0'': Zero. Has an unusual effect on co-ordinates if non-zero.
* '''const UByte''' ''T'': Type of movement.
* '''const Short''' ''X'': X offset amount, relative to current position.
* '''const Short''' ''Y'': Y offset amount, relative to current position.
* '''const Short''' ''Z'': Z offset amount, relative to current position.
* '''const UShort''' ''S'': Speed of the offset movement, if type is non-zero.
==== Description ====
Offsets the field object, belonging to the entity whose script this opcode resides in, by a certain amount. After being offset, the character moves on the walkmesh as per the walkmesh's shape, but at a certain distance away from the normal walkmesh position. Other field objects are unaffected, and their position or movements are maintained on the walkmesh's original position.
The amount to offset is specified relative to the current position. If '''T'''ype is specified, the object moves gradually from its current point to the offset position; this can be used to simulate movements such as elevators. Any type outside the range in the table will cause the offset not to occur. If the object is set to move gradually, then the speed of offset can be set; the greater the number, the slower the object moves to its target offset.
Script execution may also be halted until the gradual offset has been completed. For this, see [[FF7/Field/Script/Opcodes/C4 OFSTW|OFSTW]].
==== Movement Types ====
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! style="background:rgb(204,204,204)" width="40" | ID
! style="background:rgb(204,204,204)" width="150" | Movement Type
|-
| align="center" | 0
| Instantaneous
|-
| align="center" | 1
| Linear (Point-to-point)
|-
| align="center" | 2
| Quadratic (Smoothed)
|-
|}