Author Topic: Event_Print --- Added brickPrintEqual  (Read 3274 times)

Dawn and I were making some slot machines and realized it was kinda hard, and you had to use VCE.
So I made this:

(named brick could also be self)
onActivate->NAMED BRICK->setRandomPrintNum [0] [1]
onActivate->NAMED BRICK->brickPrintEqualTo [1]
onPrintTestSucces->Client->CenterPrint [You won!] [3]
onPrintTestFailure->Client->CenterPrint [You lost!] [3]

It also comes with onPrintEqual 0 though 9 which could be used to create the above with:

onActivate->Self->setRandomPrintNum[0][1]
onPrintEqual0->Client->CenterPrint [You lost!] [3]
onPrintEqual1->Client->CenterPrint [You won!] [3]

(note, due to a bug in setRandomPrintNum, this above example won't work without modifying the random print num add-on)

The onPrintEqual6 event is an improvment over the onPrintCountReachSix event in that the onPrintCountReachSix won't trigger unless the number reaches six by
brick->incrementPrintCount, where as onPrintEqual6 will trigger if 6 is reached with brick->incrementPrintCount OR brick->setPrintCount

Download:
http://syerjchep.org/event_print.zip


Version 2 makes the onPrintEqual# event also trigger on a decremented print count, not just an incremented one.
It also adds the onPrintChange input event.

Version 3 has brickPrintEqual, which is like brickPrintEqualTo, except instead of a number argument, it checks if the brick doing the event has the same print number as the target brick.
« Last Edit: December 28, 2013, 08:37:13 AM by DrenDran »

my computer gives me an error message whenever I try to open the folder
what

my computer gives me an error message whenever I try to open the folder
what
It opens fine for me.
Yeah I made the file on a linux computer, but a .zip should be a .zip where ever it is.

Can you make onPrintChange like in MegaScience's Print Events?

this is really useful for making a bomb defusal minigame. thanks dren

Can you make onPrintChange like in MegaScience's Print Events?
Well if he already made it, why should I lol?

Well if he already made it, why should I lol?
Because the add-on tends to break randomly, it's the only other print event that has been made that you don't have, and it was crap-onned. If you put that event in this one I would totally start using this.

Because the add-on tends to break randomly, it's the only other print event that has been made that you don't have, and it was crap-onned. If you put that event in this one I would totally start using this.
Added, tell me if there's any problems with this one.


Nice, now I can make a casino!

slot machine are easy right

onActivate>namedBrck>setRandomNumber
                   slot1

Whatever. I already made and released a setRandomPrintNum event on RTB.

EDIT:
onActivate->Self->setRandomPrintNum[0][1]
onPrintEqual0->Client->CenterPrint [You lost!] [3]
onPrintEqual1->Client->CenterPrint [You won!] [3]

(note, due to a bug in setRandomPrintNum, this above example won't work without modifying the random print num add-on)
Oh. Well why didn't you say so?

What does not work about it? I guess I'll have to look at your add-on when the download link works.

I was under the impression that this came with a setRandomPrintNum event... I'm still not sure if it does or not.
« Last Edit: January 07, 2014, 01:26:35 PM by jes00 »

...you had to use VCE.

Lies, you can easily make a slot machine using default events!

Lies, you can easily make a slot machine using default events!
Few seem to realize how much you can actually do with default events if you go advanced and include bricks as components


hinthint

Few seem to realize how much you can actually do with default events if you go advanced and include bricks as components


hinthint
yeah, you can use this with projectiles