Author Topic: looping events?  (Read 403 times)

So, apologies if this seems as a dumb question, but how do you loop events?

Code: [Select]
onActivate > Self > cancelEvents
onActivate > Self > fireRelay
onRelay > Self > fireRelay
onRelay > Self > stuff

Say you want to fire a projectile, but the event to loop.

The basic event would be
Code: [Select]
[0] onActivate-Self-spawnProjectile-[projectile]
If you want it to loop, you use relays.
Code: [Select]
[0] onActivate-Self-fireRelay
[33] onRelay-Self-fireRelay
[33] onRelay-Self-spawnProjectile-[projectile]

The [33] is how long that event executes after the first line of events. That would be 33 milliseconds. You can set both [33]s to say...[5000] so every 5000 milliseconds (5 seconds) the brick fires a projectile.

Code: [Select]
onActivate > Self > cancelEvents
onActivate > Self > fireRelay
onRelay > Self > fireRelay
onRelay > Self > stuff
Im guessing that would still work if I replaced Self with NamedBrick?

Im guessing that would still work if I replaced Self with NamedBrick?
what?

depends.

Im guessing that would still work if I replaced Self with NamedBrick?

Yes.