header image
Blog Menu
Developer
Mr Cryptic
Mr Frenzy
All
RPG Resources
City Generator
Who's Online
We have 9 guests online
Feeds
Home arrow Blog arrow Developer arrow Button Event Scripting!
Button Event Scripting! PDF Print E-mail
Written by CrystalBallSoft Staff   
Jan 06, 2009 at 04:39 PM
Anyone got a good remedy for the Holidays Hangover? I'm not talking drinking, never touch the stuff myself. I'm talking about having worked only 1 day in 11, and 4 days out of 18. And now I'm feeling groggy, bored, exhausted, unhappy, headachey, bleary eyed, and, all in all, a poor employee.

The holidays were good to CBLite. The main set of scripting functions and programming is done. Some late additions are being added including some cool custom prompting functionality, exporting and importing single buttons for sharing with friends, and button event scripting!
It's been a flurry of programming and has finally given light to the possiblity of actually being able to move this version to testing. Once button aligning is done we're good to go.

I'd like to work up a bit of frenzy on button events. Sounds scary. Too complicated. Maybe it sounds better if it's called Button Responders, Reactions, Power Buttons...
Restart. Buttons are the things you can click on to do a roll. They can be colored, come in a variety of styles, and provide a great way to organize your character (if you're a player) or monsters (if you're a DM) for quick access.

Now buttons have the ability to change what they do based on what's going on around them. The possible events are: Open, Paint, PreRoll, PostRoll, MouseOver, and Close. These events can call scripts (examples are provided as well as documentation under CBLite's help menu on how to write your own scripts). The scripts can then do creative fiddling with the buttons and data to make buttons "talk" to each other.

The open and close events can be used when changing dice sets to switch current data for use with the new character.

When a button is pressed, PreRoll and PostRoll occur before and after the actual dice roll. PreRoll allows setup of information before a roll including prompting the user for data to put in the roll. PostRoll can respond to the results of a roll, showing a special message or playing a sound on special results like critical misses and critical bads.

The Paint event occurs whenever the button draws. CBLite's scripting functions include ways to draw lines, ovals, rectangles, text, and many other tools. This allows buttons to look exactly how you want including changing how they look depending on the state of other buttons such as a Bloodied button that could turn red and say "bloodied" when the character is bloodied, be gold in color and say "full hps" when the character is at full health, and be black and say "dieing" when hps are 0 or less. Very cool stuff.

MouseOver can be used to react to different areas of a button. Suppose you make a custom button that has three parts and resopnds differently based on which section is clicked. MouseOver allows you to track the current mouse position to know which section was clicked. MouseOver combined with the Paint event can also allow custom drawing of the button depending on where the mouse is, maybe drawing a hand over one part of the button, or maybe dripping water from the cursor while it hovers the button.

These events blow the doors wide open on what CBLite is capable of. And, with the examples to be provided, the comprehensive documentation, and the messageboards, many ways are provided for everyone to create dice sets and buttons that make game flow smoother and give a clear view of a character's current state at a glance.

Best yet is that, with button exporting and importing, the cool buttons created by others can be given to others to enjoy. We're working out a character dice set building script that should help keep a basic set of variables common among characters so that sharing buttons will be easy and global.

So, as you can see, the holidays were more than just partying. But there's nothing more fun then getting exciting features ready for the masses. I just hope my boss doesn't notice the lack of zeal for real life projects.
User Comments

Comment by GUEST on 2009-01-07 11:08:48
i think i need that water dripping button imported to simulate my drooling....

Comment by GUEST on 2009-01-12 20:29:25
Swwweeeeetttttt !

Comment by GUEST on 2009-11-11 09:43:40
YO80D7 zhcntquiqaee, [url=http://kqzzrlehqjiq.com/]kqzzrlehqjiq[/url], [link=http://njgvxlwjuhka.com/]njgvxlwjuhka[/link], http://thrgofvmadsb.com/

Comment by GUEST on 2010-01-05 10:23:10
7ilgwE rvhbgyjuuzyg, [url=http://mhjazdeyozwj.com/]mhjazdeyozwj[/url], [link=http://bazgjztohufv.com/]bazgjztohufv[/link], http://zmqflvyahsee.com/

Comment by GUEST on 2010-03-04 03:33:48
nRoszd shcqeexpxbes, [url=http://woomuoqdnoxk.com/]woomuoqdnoxk[/url], [link=http://yzghkynlqght.com/]yzghkynlqght[/link], http://rrryqeimrtnu.com/

Comment by GUEST on 2010-03-05 09:54:15
online cialis [url="http://www.arkcalledearth.org/"]online cialis[/url] http://www.arkcalledearth.org/ online cialis 471351