Difference between revisions of "FF7/Field/Script/Opcodes/00 RET"
Jump to navigation
Jump to search
m (2 revisions imported) |
|||
| Line 12: | Line 12: | ||
==== Description ==== | ==== Description ==== | ||
| − | When an [[FF7/Field/Script/ | + | When an [[FF7/Field/Script/Actor|actor]]'s event is being executed as part of a request (function call), the return opcode will cause current execution to halt and return to whatever the actor was previously executing (at some lower [[FF7/Field/Script/Priorities|priority]]). If the execution was requested via a synchronous call ([[FF7/Field/Script/Opcodes/03 REQEW|REQEW]] or [[FF7/Field/Script/Opcodes/06 PRQEW|PRQEW]]), the completion of execution is also signalled to the calling actor which can resume execution. |
| − | If ''return'' is used when executing at | + | If ''return'' is used when executing at lowest priority (0x7), execution will simply halt. This is what happens in the [[FF7/Field/Scripts/Entry script|entry scripts]]. |
Latest revision as of 12:16, 21 September 2025
- Opcode: 0x00
- Short name: RET
- Long name: Return from request / Halt
Memory layout
| 0x00 |
|---|
Arguments
None.
Description
When an actor's event is being executed as part of a request (function call), the return opcode will cause current execution to halt and return to whatever the actor was previously executing (at some lower priority). If the execution was requested via a synchronous call (REQEW or PRQEW), the completion of execution is also signalled to the calling actor which can resume execution.
If return is used when executing at lowest priority (0x7), execution will simply halt. This is what happens in the entry scripts.