Author Topic: Conditional Events  (Read 11988 times)

These events will allow you to check wether a brick has a certain color or print and also if the player has said a particular phrase.



How to use:
Simply put one of the ouput events on a brick and a coresponding 'onConditionX__' input event.

The first parameter is what to check for - ie. For 'onPrintEquals' it would be 'A' or '4' and for 'onColorEquals' it will be a color.

The second parameter is which condition to use - these events can check on 1 of 3 inputs.  For instance if you put '2' then the event would fire 'onCondition2Pass' if it did equal and 'onCondition2Fail' if it didn't.

Tips:
The 'onTalkEquals' is best to use with the 'onPlayerTalk' input.
You can cause the event to check continuously by putting it on a relay and making the brick fire its own relay after a small delay (make sure you put in a delay though or you will lag)

Save the zip file to Add-Ons (sorry about mediafire)
http://www.mediafire.com/?ddijzyn9yyw

ps. to coders - I also have a 'onRelayEquals' but for some reason it causes relays to not work so i've commented it - if anyone can tell me how to fix it i'll repost the addon

By the way I forgot to credit Headcrab Zombie - I did modify the ifPrintThenRelay script. Thanks
« Last Edit: August 27, 2008, 11:40:28 PM by Eagleson »

This sounds like it could be very useful.


 This is something like the "If" Event everyone wanted. Downloaded.




I dont really get what this is for.i dont mean to sound stupid though im not trying to look bad either.

Make sure you limit delays so server crashes will not occur.

Suggestions:
onVehicleEquals
onItemEquals
onLightEquals
onEmitterEquals
onProjectileEquals (for onProjectileHit)
onExplosionEquals (for onBlownUp)
Or, better yet:
onVariableEquals Var Value Input
SetVariable Var Value
(add checks for Datablock, paintID, ShapeFXID, PaintFXID, rotid, etc. stuff you dont want changed.)

This is very nice indeed.

Make sure you limit delays so server crashes will not occur.
This is what the schedule quota is for.

Very nice! Glad to see that there's still newbs out there with coding skills.

This put with password events would be nice....

You didn't use my ifPrintThenRelay code, did you? Because your onPrintEquals variable names are the same as mine.
If you did, credit me.
If you didn't, then forget I said this.

I guess it's not that big of a deal....
« Last Edit: August 27, 2008, 02:29:10 PM by Headcrab Zombie »

THANK YOU I NEEDED THESE ESPECIALLY THE PRINT ONE

This is done oddly, what if you want 4 conditions?  Just do it like If->Print->8-><NAMED BRICK>->FireRelay