DragonSpeak Buttons are special features you can add to a custom skin in your dream. These buttons can be used just like normal interface buttons, or you can skin them to look like clothes on your "butler" avatar, pieces in a boardgame or cardgame, an inventory... endless possibilities!
The DS that handles DS Buttons is nice and easy. With just nine DS lines, you can control up to 99 buttons(*). You can stick 'em anywhere you like on your screen, people can click them, and you can get your dream to do stuff when they do!
The most important line to make this magic happen:
(0:81) When a furre clicks any DragonSpeak Button,
(0:80) When a furre clicks DragonSpeak Button #Button Number
That's pretty easy. If you want to check for people clicking the first button, you put the number 1 up there by the '#'. For the second button, 2. Yay, easy! :D
But, you can't click buttons that aren't there, so the most important line is really:
(5:180) show the triggering furre's DragonSpeak Button #Button Number.
...and its partner,
(5:181) hide the triggering furre's DragonSpeak Button #Button Number.
Well those are just as easy! Now you already know how to show a button, let the button get clicked, and maybe if you feel like it, hide the button again. Or maybe just show it and then hide it again before they can click it. Mwahaha!
These lines have a slightly more subtle brother:
(5:183) Show the triggering furre's DragonSpeak button #Button Number in tab #Tab Number.
This one lets you associate a button with one of the lettered tabs, A to E. It's nice, because it doesn't force you to to display the buttons in the tabbed area - they can be anywhere on screen, but will only be shown when that tab is visible.
So, say you are using some of your buttons as chess pieces, and some as checkers pieces... you could have it so that clicking different tabs would change between games, or hide the boards altogether. Yay!
Except for one thing. How do you tell the buttons where they should be on the screen?
This perhaps, is the most most-important line. Without it, all your buttons will clump on top of each other at the top left of the screen, which would be awfully ugly.
(5:182) move the triggering furre's DragonSpeak button #Button Number to (#X,#Y).
This lets you move the button around the 640x480 Furcadia window, to any position you want.
Buttons from the skin might draw on top of your buttons, if you move the buttons over them. Since which components will have this problem depends on the player's skin (whether classic, default, or a custom skin), it's a good idea to use the skin editor to set the buttons to a higher "z-index" than the default "bottom" level to guarantee that they will always be drawn on top.
So... if you've made a dream where people who find a helmet get a helmet-shaped button2 over their "waiter"'s head, and you've made it so that when they click it, it gets replaced by button 2, which shows the visor raised. That's pretty cool, but without them clicking on it, how do you tell if they are showing the raised-visor, lowered-visor, or have no helmet at all?
The last two lines of simple DS for buttons do that for you.
(1:95) and their DS Button #Button is visible, (1:195) and their DS Button #Button is not visible,
Now, these tests only check to see if one of the "show" lines has been run on that button, without the "hide" line following. So they don't test whether you have moved the button off the screen, or whether you've moved it off to a tab that's not active.
The perspicacious reader will have noticed that there is yet one problem. If you have a deck of cards displayed, and you want to write "when someone plays a card, have the dream play one of the same suit or number", do you have to repeat the same script lines 52 times slightly differently?
Of course not! So, with this last line of DS, we can store which button was pressed into a variable.
(5:184) set variable # to the number of the DragonSpeak Button they just pressed.
(0:81) When a furre clicks any DragonSpeak Button, (5:184) set variable %BUTTON to the number of the DragonSpeak Button they just pressed. (5:181) hide the triggering furre's DragonSpeak Button %BUTTON. (5:312) set variable %NEW to the total of rolling 1 dice with 99 sides plus 0. (5:180) show the triggering furre's DragonSpeak Button %NEW.
Whenever someone clicks a button in this game, it will hide that button, and show another random one. With the right patch, the buttons could be targets on a range: as you hit one target, another pops up. A few more lines of DS could give you the time you took to complete a range. By making each target out of a few concentric buttons, like a bulls-eye, you could even give them an accuracy rating, too!
(* well, at the time I'm writing this, in 2007, you get 99 buttons. When you're reading this, in 2050, you'll probably have more than a hundred! Wow. Hi, futurepeople! How did the skycars and android maids and silver jumpsuits work out for you? Did you give it all up to play on Furc instead? Thought so.
Hi there. If you're reading this, you must be a hardcore scripter, or a high powered executive with no time for that reading stuff. You need an immediate infodump to know enough to order your minions about! So let's get straight to the hard data!
Make sure your minions know these lines:
(0:80) When a furre clicks DragonSpeak Button #Button Number (0:81) When a furre clicks any DragonSpeak Button, (1:95) and their DS Button #Button Number is visible, (1:195) and their DS Button #Button Number is not visible, (5:180) show the triggering furre's DragonSpeak Button #Button Number. (5:181) hide the triggering furre's DragonSpeak Button #Button Number. (5:182) move the triggering furre's DragonSpeak button #Button Number to (#X,#Y). (5:183) Show the triggering furre's DragonSpeak button #Button Number in tab #Tab Number. (5:184) set variable # to the number of the DragonSpeak Button they just pressed.
If your buttons will overlap any interface buttons, tell your minions to use the Skin Editor to move all DS buttons to the "middle" or "top" Z-order, instead of the "bottom", so they aren't overdrawn by buttons from the skin.
The ranges are:
#X and #Y can be outside these limits, but if so, you won't be able to see all of the button: like, drawing it at 800,800 will be outside the Furcadia window.
Lines 1:95 and 1:195 (is button visible/not visible?) only test if 5:180 or 5:183 (show button lines) have been run for the button, without a subsequent 5:181 (hide). If a "shown" button is moved off the screen, or is on a tab that is not currently selected, it is still counted as "visible".
There's no simple way at the moment to:
Hopefully some of these these will be addressed in future updates!
This page, subsequent pages and all content therein, unless otherwise stated is copyright © Dragon's Eye Productions. Site maintained by The Beekin Scribes.