Difference between revisions of "FF7/Field/Script/Opcodes/07 RETTO"
Jump to navigation
Jump to search
my_wiki>BukTop m (1 revision imported) |
Dangarfield (talk | contribs) (RETTO tweak to reflect stopping queued scripts) |
||
(One intermediate revision by one other user not shown) | |||
Line 11: | Line 11: | ||
==== Arguments ==== | ==== Arguments ==== | ||
* '''const Bit[3]''' ''P'': The [[FF7/Field/Script/Priorities|priority]] at which we want to execute the remote script (high 3 bits of byte). | * '''const Bit[3]''' ''P'': The [[FF7/Field/Script/Priorities|priority]] at which we want to execute the remote script (high 3 bits of byte). | ||
− | * '''const Bit[5]''' ''F'': The ID of the specific member function of the | + | * '''const Bit[5]''' ''F'': The ID of the specific member function of the current entity to be executed to (low 5 bits of byte). |
==== Description ==== | ==== Description ==== | ||
− | + | Stops the active script loop for this entity and also any script loops (except the main) that are queuing to be executed after the current script. This is essentially the same as adding a RET onto each of the active / queued scripts next execution position and returning the current op index to index for each script. | |
+ | |||
+ | THEN the script control is passed to the script ''F'' within the current entity with the priority ''P''. |
Latest revision as of 23:19, 23 November 2020
- Opcode: 0x07
- Short name: RETTO
- Long name: Return To
Memory layout
0x07 | P / F |
---|
Arguments
- const Bit[3] P: The priority at which we want to execute the remote script (high 3 bits of byte).
- const Bit[5] F: The ID of the specific member function of the current entity to be executed to (low 5 bits of byte).
Description
Stops the active script loop for this entity and also any script loops (except the main) that are queuing to be executed after the current script. This is essentially the same as adding a RET onto each of the active / queued scripts next execution position and returning the current op index to index for each script.
THEN the script control is passed to the script F within the current entity with the priority P.