DragonSpeak Buttons

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,

And that's it! But sometimes, you care which button was clicked in which case you can use:

(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.

How would you ever use such a line? Well, here is an example of a simple game:

(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 of writing, 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.)

Account E-Mail

Password