Author Topic: How to Relay Events work?  (Read 518 times)

I know they're used to make things happen endlessly, but how does one use them? I really can't figure out how to do any of this Relay stuff, but I could use some endless loops for certain things. An explanation would be nice.

Change Color Relay:

1  {0}OnActivate>Self>fireRelay
2  {0}OnRelay>Self>setColor {red}
3  {500}OnRelay>Self>setColor {blue}
4  {1000}OnRelay>Self>fireRelay

That would make it so when you click it once the brick changes color every 500 milliseconds.
You can use relays for many things, time bombs, timers, continuous alarms, extended delays, and pretty much anything.

I thought making another example would help:

Extended Delays:

There are four bricks in total, they're in this formation:
[] stands for a brick. The numbers in the bricks stand for the brick name. (To clarify things)
       N
    [1][2]             
W [4][3] E

       S

Brick 1:
0  {30000}OnActivate>Self>fireRelayEast
Brick 2:
0  {30000}OnRelay>Self>fireRelaySouth
Brick 3:
0  {30000}OnRelay>Self>fireRelayWest
Brick 4:
0  {30000}OnRelay>Self>Something Here.

That obviously is very empty, but of course its just a example!
I think the fireRelayUp, Down, North, South, East, and West only go around 1 brick in distance. I'm not sure, haven't really tried before. Hope this is helpful. :D I also hope its explanatory enough.

I made a Relay events tutorial on microsoft word. I think I should upload it, but what he said above mostly says it.

Relays are much like radio signals, it allows bricks to communicate between each other without noticing it.