[Event] FireRelayNum v8.1 - Relay where no one has relayed before

Author Topic: [Event] FireRelayNum v8.1 - Relay where no one has relayed before  (Read 9461 times)

FireRelayNum
The old Add-On makes comeback with enhanced performance. You pick the onRelays to fire. One relay to rule them all.

Example
Code: [Select]
onActivate -> Self -> fireRelayNum ( "1", "Brick" )
onRelay -> Self -> setColor ( "blue" )
onRelay -> Self -> setColor ( "white" )

The brick will be colored blue. It is also possible to insert multiple numbers like:
Code: [Select]
1 5-7 9 11 15-17
The list is the direction of the event where Brick is the default current brick.

For fireRelayRandomNum, it will pick only one of the relays.

Code: [Select]
onActivate -> Self -> fireRelayRandomNum ( "1-2", "Brick" )
onRelay -> Self -> setColor ( "blue" )
onRelay -> Self -> setColor ( "white" )

The brick will randomly become blue or white.

Protip: Adding the same number more times in fireRelayRandomNum results in it being picked more frequently.

"If the event does not come to you, you come to it."

Download (aposoc.net)
Download (blocklandglass.com)

GitLab

Changelog
Code: (v5) [Select]
Improved performance significantly for bricks with lots of events but few targets.
Code: (v6) [Select]
Added fireRelayRandomNum
Fixed appended client
Removed redundant inputTarget
Code: (v7) [Select]
Fixed delay issue for fireRelayRandomNum
Performance and security improvements
Code: (v8) [Select]
Added support for Event_onRelay
Minor modifications
Code: (v8.1) [Select]
Added support for EventScript labels
« Last Edit: November 03, 2018, 05:40:59 AM by mctwist »


Excellent! Should get a lot of use out of this.



No more invisible relaying bricks! Thank you, mctwist.

YOU DON'T loving KNOW HOW USEFUL THIS IS TO ME HOLY SHIIIIIIIIIIT

wait what's changed? just goes faster?

could you make something like FireRandomRelayNum?

wait what's changed? just goes faster?
You can choose specific events to be executed by the relay.
You should really read the topic thoroughly and look at the very good example before you ask what it does.


You can choose specific events to be executed by the relay.
You should really read the topic thoroughly and look at the very good example before you ask what it does.

He means what's changed since the 2013(?) version.
From what I can see it's the super useful specifying blocks of events in amongst singular events like:
[ 1 5-7 9 11 15-17 ]

And I presume faster/more efficient going off of:
The old Add-On makes comeback with enhanced performance.


OT: Looks awesome, will update for sure!

could you make something like FireRandomRelayNum?

I'm not sure what you mean with this and what you want me to do. Could you elaborate?

wait what's changed? just goes faster?

That is indeed right!

He means what's changed since the 2013(?) version.
From what I can see it's the super useful specifying blocks of events in amongst singular events like:
[ 1 5-7 9 11 15-17 ]

And I presume faster/more efficient going off of:

OT: Looks awesome, will update for sure!

Actually, I've only improved the performance significantly for bricks with lots of events. The feature you describe have existed since the first version.

I'm not sure what you mean with this and what you want me to do. Could you elaborate?

That is indeed right!

Actually, I've only improved the performance significantly for bricks with lots of events. The feature you describe have existed since the first version.
instead of relaying all of the numbers in the box, it picks a random number to relay, so for instance [ 1 5-7 9 11 15-17 ] would pick a random event out of 1,5,6,7,9,11,15,16,17 to relay

Actually, I've only improved the performance significantly for bricks with lots of events. The feature you describe have existed since the first version.
Oh wow I had no clue! Well, it's still always awesome to have an event that's used profusely made more efficient! :D

instead of relaying all of the numbers in the box, it picks a random number to relay, so for instance [ 1 5-7 9 11 15-17 ] would pick a random event out of 1,5,6,7,9,11,15,16,17 to relay

I have never seen such a feature in Blockland before, so it is indeed interesting. I will think about it as I'm unsure if I'm going to just add a checkbox or a whole new event. What would you guys prefer?

Oh wow I had no clue! Well, it's still always awesome to have an event that's used profusely made more efficient! :D

I thought that the first sentence in the post would make more sense, but as you didn't notice, I'll now added a changelog to make it more obvious what actually have changed.