List of Opcodes: Difference between revisions
m oops minor spelling mistake |
m e.g. not i.e. im sowwy ok i'll stop now |
||
| Line 7,987: | Line 7,987: | ||
|} | |} | ||
=== 0x149 - SwitchSector === | === 0x149 - SwitchSector === | ||
Returns the currently-loaded "sector" for a given routine. When used in targeted routines, this returns the sector the entity is loaded on. When used in the main routine, this returns a value passed in to load the scene, | Returns the currently-loaded "sector" for a given routine. When used in targeted routines, this returns the sector the entity is loaded on. When used in the main routine, this returns a value passed in to load the scene, e.g., the final parameter of <code>supervision_ExecuteActingSub</code>. Most often used in Enter scenes to mark a Cutscene -> Overworld transition, but can also be checked within Acting scenes. | ||
In ExplorerScript, this can be simply represented as <code>switch(sector())</code>. | In ExplorerScript, this can be simply represented as <code>switch(sector())</code>. | ||