Sub EventsAllows you to do all kinds of crazy stuff if you know how!
DescriptionContains a grand total of:
- ONE Input Event
- ONE Output Event
onSub input, and doSub output.
The doSub output has two parameters: first and last events to process. It then processes all events of onSub input starting at the lower and ending at the upper bound you supply:
- 0 [ x ] 0 onActivate -> Self -> doSub [ 1, 2 ]
- 1 [ x ] 0 onSub -> Self -> SetColor [ Red ]
- 2 [ x ] 0 onSub -> Client -> Centerprint [ Hello World!, 2 ]
- 3 [ x ] 0 onSub -> Self -> killBrick
Activating that brick would cause it to turn red and centerprint. Changing the 2 in the doSub event to a 3 would also cause it to kill.
v2: Introduced loop delay enforcement (like onRelay -> FireRelay delays)
RTB Server Control has a preference for this, it is by default 100ms minimum delay and can be set as high as 1000ms (one second).
Edit (7:35am 24-6-2009 GMT+10): Fixed a bug where if you provide the start and end of range in reverse, the safeguards would instead set them both to be the lower value instead of swapping them. Fixed this - thanks, Space Guy!
DownloadEvent_doSub.zip (Last Updated: Wed Jun 24, 2009 7:35 am)
InstallationPut Event_doSub.zip into the Add-Ons folder in your Blockland folder.
Click Here to view this file on the RTB Download Manager