Please create an account or Login! Have fun!

C2G: Difference between revisions

Jump to navigation Jump to search
1 byte removed ,  21 May 2021
no edit summary
No edit summary
No edit summary
Line 283: Line 283:


=== Registers ===
=== Registers ===
Variables reg1 to reg4 can be used to store arbitrary flags, will be stored between chained scripts, and will be included in the player's save data. Here, a "switch palace" level includes two exits, the second of which sets the lowest bit in reg4 to 1, which the script then detects to swap out the next level for an alternate version:
Variables reg1 to reg4 can be used to store arbitrary flags, will be stored between chained scripts, and will be included in the player's save data. Here, a "switch palace" level includes two exits, the second of which sets the lowest bit in reg4 to 1, which the script then detects to swap out a later level for an alternate version:
  <nowiki>map "SwitchPalace.c2m"
  <nowiki>map "SwitchPalace.c2m"
1 exit == do goto #afterpalace
1 exit == do goto #afterpalace
trusted-editors
331

edits

Navigation menu