Author Topic: Sub Events  (Read 11839 times)

ooooh, Idon'tget it! Meh, I'll have to try it for myself...

Sub Events
Allows you to do all kinds of crazy stuff if you know how!

Description
Contains 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!

Download
Event_doSub.zip (Last Updated: Wed Jun 24, 2009 7:35 am)

Installation
Put Event_doSub.zip into the Add-Ons folder in your Blockland folder.

Click Here to view this file on the RTB Download Manager
cool moop!!!!hav a cocie :cookie: :cookie: :cookie: :cookie: :cookie: :cookie: :cookie: :cookie:



The link for this add-on's direct download is broken, please fix it.


cool moop!!!!hav a cocie :cookie: :cookie: :cookie: :cookie: :cookie: :cookie: :cookie: :cookie:
AWWW CRAP A NOOB.
Nice this is kinda like variables right?

The link for this add-on's direct download is broken, please fix it.
Ah yes, this is from RTB2's system. I'll put it onto RTB3 in the next couple of days if I can be bothered to do it between 20 hour sessions of punching people in Oblivion. Winning using fists only is hard.


I just had an epiphany and understand how this works :D

Don't we already have this (*cough*relayevents*cough*)?


I need a better explanation. So far, this event seems almost useless.

I need a better explanation. So far, this event seems almost useless.
Nice bump, but this.