Changes

Jump to navigation Jump to search

FF7/Field/Script/Opcodes/61 SCRLO

1,938 bytes added, 17:47, 31 October 2020
Created page with "* Opcode: '''0x61''' * Short name: '''SCRL0''' * Long name: Scroll To Playable Character ==== Memory layout ==== {| border="1" cellspacing="1" cellpadding="3" style="border:..."
* Opcode: '''0x61'''
* Short name: '''SCRL0'''
* Long name: Scroll To Playable Character

==== Memory layout ====
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! width="40" | 0x63
! width="40" | ''B''
! width="80" | ''S''
! width="40" | ''U''
! width="40" | ''T''
|}

==== Arguments ====

* '''const UByte''' ''B'': PRESUME -> Bank for the scroll speed, or zero if it is specified as a literal value. Always zero in game data
* '''const UShort''' ''S'': Speed of the scroll, in frames, or the address to find the speed if ''B'' is non-zero.
* '''const UByte''' ''U'': Unknown -> Always zero in game data. Seems to affect the speed above.
* '''const UByte''' ''T'': Type of scroll.

==== Description ====

Scrolls the current view so that the main playable character is in the center of the view.
The script executes asynchronously and does not block whilst the camera movement is active but returns control to the next script operation.
This is tweened over a period of ''S'' frames.
If the main playable character also moves during this time period, the tween position is also updated to match the new playable character location.
Once the camera has completed its movement, the camera NO LONGER follows the main playable character's movement. It stays in place.

==== Scroll 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" | Scroll Type
|-
| align="center" | 0
| No effect - Camera does not move, returns script, camera still follows the playable character is it did before
|-
| align="center" | 1
| No effect - Camera does not move, returns script, camera still follows the playable character is it did before
|-
| align="center" | 2
| Linear
|-
| align="center" | 3
| Smooth (QuadraticInAndOut)
|-
|}
53
edits

Navigation menu