Just want a list that has the different kinds of event loops.
Single Brick
Relay Loop:
X 33ms onActivate Self fireRelay
X 33ms onRelay Self fireRelay
X 0ms onRelay -do stuff-
A relay is fired upon itself, which triggers onRelay. Basic loop with a minimum 33ms delay.
ifVariable Loop
X 0ms onActivate Self VCE_ifVariable -var- == -anything- 1 99
X 0ms onVariableFalse Self VCE_ifVariable -var- == -anything- 1 99
X 0ms onVariableFalse -do stuff-
As long as -var- is not set -anything- it should return false, which triggers the same comparison again. Probably the fastest and most efficient one; easily canceled if -var- becomes -anything-.
VariableUpdate Loop:
X 0ms onActivate Self VCE_modVariable -var- Set -anything-
X 0ms onVariableUpdate Self VCE_modVariable -var- Set -anything-
X 0ms onVariableUpdate -do stuff-
A VCE variable is updated, which triggers onVariableUpdate. Not useful if you want to use VCE_modVariable again.
VariableFunction Loop
X 0ms onActivate Self VCE_stateFunction -name- 2 99
X 0ms onActivate Self VCE_callFunction -name-
X 0ms onVariableFunction Self VCE_callFunction -name-
X 0ms onVariableFunction -do stuff-
You have to state and call the function, which triggers onVariableUpdate. Stating required and sometimes functions can be unwieldy (for me at least).
Gravity Projectile Loop
X 0ms onActivate Self spawnProjectile 0 0 3 Arrow
X 0ms onProjectileHit Self spawnProjectile 0 0 3 Arrow
X 0ms onProjectileHit -do stuff-
A projectile goes up and comes back down, which triggers onProjectileHit. Also known as the "Why are you hitting yourself?" Loop. Slow and ineffective. Easily stopped by something getting in the way.
Multi-Brick
Relay Loop
X 33ms onActivate Self fireRelayDown
X 0ms onRelay Self fireRelayDown
X 0ms onRelay -do stuff-
X 0ms onRelay Self fireRelayUp
Two bricks; one on top of the other. Brick fires down, brick fires up.
Projectile Loop
X 0ms onActivate Self spawnProjectile 0 5 0 Pong
X 0ms onProjectileHit Self spawnProjectile 0 5 0 Pong
X 0ms onProjectileHit -do stuff-
X 0ms onProjectileHit Self spawnProjectile 0 -5 0 Pong
Two bricks; one north of the other. Brick shoots one; it shoots back.