Event Instruction 2F
Jump to navigation
Jump to search
Contents
{2F} BlockLoop
BlockLoop(LPA,xVR,xDEST)
This instruction allows looping a block until the defined variable reaches, or is set to 0. It has to be placed inside a block in order to work.
A block left running will prevent the event from ending!
See also: {2A} BlockStart ― {2B} BlockEnd
Loop Amount : Byte (unsigned)
- 000: Loops indefinitely (the variable has to be manually set to 0 to end the loop)
- 001: Decreases the variable by 1 every loop until it reaches 0
- 002-255: Sets the variable to the given value, and decreases the variable by 1 every loop until it reaches 0
Variable : Byte (hex)
Warning: Only x00-x7F (words) are valid with this instruction!
Click here for the list of Variables
Destination (half-word)
- x0000: Jump back to previous {2A} BlockStart
- x8000-xFFFF: Jump back by # of bytes
- x0001-x7FFF: Jump forward by # of bytes