Action 02 is a point within an action block that you may jump to via a return value or other action. They allow you to loop and execute commands in a particular order. It is the equilvelant of Perfect Dark's action 0002.



02 Action Type.
XX Label


This action merely sets a position within the action block you can jump to. The label value corresponds to return values in other action types or to the label values of the proceed to label and go to beginning; proceed to label commands.

Certain actions will return a value. The return value is similar to a proceed to label command; when a value is returned, code resumes at the next label that matches the return value. If there isn't a matching label, the loop terminates. For example:

  1. CF07 if in intro swirl, return 07
  2. ...
  3. ...
  4. 0207 resume here after action returns

In this example, when the action on line one returns its value, whatever code is on lines two and three are skipped. Execution continues immediately on line four.

Usually you will want to make sure each label has a different value to ensure you jump to the right location. However, you can have more than one label with the same value. When an action returns a value, it jumps to the first matching label following the command, as seen here:

  1. 0207
  2. ...
  3. CF07 if in intro swirl, return 07
  4. ...
  5. 0205
  6. 0207 resume here after action returns
  7. ...
  8. 0207

The label action is fundamental to creating mini-loops within your action loop. Consider this mini-loop:

  1. 0205 start here
  2. F107 if objectives complete, return 07
  3. 03 break and iterate
  4. 0105 start at label 05
  5. 0207 resume here when objectives complete
  6. ...

Until the F1 command returns, the start at label command jumps back to the 0205 label. This mini-loop continues until the objectives are complete. When the F1 action returns a value, it breaks the mini-loop by jumping to the 0207 label. The break and iterate command was added to ensure the loop it not infinite.

See AlsoEdit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.