Blockland Files > Add-Ons
[Event] FireRelayNum v8.1 - Relay where no one has relayed before
mctwist:
FireRelayNum
The old Add-On makes comeback with enhanced performance. You pick the onRelays to fire. One relay to rule them all.
Example
--- Code: ---onActivate -> Self -> fireRelayNum ( "1", "Brick" )
onRelay -> Self -> setColor ( "blue" )
onRelay -> Self -> setColor ( "white" )
--- End code ---
The brick will be colored blue. It is also possible to insert multiple numbers like:
--- Code: ---1 5-7 9 11 15-17
--- End code ---
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: ---onActivate -> Self -> fireRelayRandomNum ( "1-2", "Brick" )
onRelay -> Self -> setColor ( "blue" )
onRelay -> Self -> setColor ( "white" )
--- End code ---
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) ---Improved performance significantly for bricks with lots of events but few targets.
--- End code ---
--- Code: (v6) ---Added fireRelayRandomNum
Fixed appended client
Removed redundant inputTarget
--- End code ---
--- Code: (v7) ---Fixed delay issue for fireRelayRandomNum
Performance and security improvements
--- End code ---
--- Code: (v8) ---Added support for Event_onRelay
Minor modifications
--- End code ---
--- Code: (v8.1) ---Added support for EventScript labels
--- End code ---
MrLoL²:
this is relay cool
Blockhead31735:
Excellent! Should get a lot of use out of this.
The Resonte!:
--- Quote from: MrLoL² on August 27, 2017, 08:58:33 AM ---this is relay cool
--- End quote ---
-___-
gr8dayseth:
oo nice
--- Quote from: MrLoL² on August 27, 2017, 08:58:33 AM ---this is relay cool
--- End quote ---
--- Quote from: The Resonte! on August 27, 2017, 09:06:33 AM ----___-
--- End quote ---
u've relay done it this time.....