DragonSpeak Buttons
DS Buttons can be used in many ways, both simple and complex, since the function of each DS Button solely depends on you, and what you choose to do with it. If you've read through the basic overview of DS buttons and you think you're ready to try doing more with DS buttons, here are some slightly more advanced techniques to using DS Buttons that will help you to achieve the most from your Dream!
Tutorial 1: Menus
Although (as mentioned in the Basic Overview of DS buttons above), using DS Buttons for simple player interaction on the screen is a common use, you can also use DS buttons to have a full chain of events. So, when would you use a menu?
Say you have a cluster of buttons filling up the screen. Although you see that it's cluttery, you probably don't want to get rid of all of your fancy buttons just yet! So, how can we compromise? How about by making a menu!
For starters, you'll need the DS button that will represent what the player will click to open and close the menu. Then, either copy and paste that same button twice, or create a downpressed or clicked version of that same menu. Some people like to do this by changing the color of the button, too!
For our example, let's say you wanted to have a teleportation system: clicking different buttons will move people to various locations in your Dream. We could have all these buttons cluttering an entire tab.. or, we can instead file all of them under one button since they're all related. We'll call it the warp button. Once it's clicked, a variety of places for players to teleport will appear. The warp button is our example of a menu, because it has a list of options that appear once clicked.
For our example DS lines, we need to mention which buttons are which. Button 1 and Button 2 will be the warp button (or, the menu open/close buttons). Then, Buttons 3, 4, 5, 6, and 7 are the various places players can teleport (in other words, the option buttons) that will become visible once the menu is opened.
Then, the trigger to open the menu would look something similar to this:
(0:80) When someone clicks DragonSpeak Button 1, **Menu Button Clicked
(1:95) and their DragonSpeak Button 1 is visible, **Button Visibility Check
(5:181) hide the triggering player's DragonSpeak Button 1. **Hides 1st Menu Button
(5:180) show the triggering player's DragonSpeak Button 2. **Shows 2nd Menu Button
(5:180) show the triggering player's DragonSpeak Button 3. **Shows Teleport Option 1
(5:180) show the triggering player's DragonSpeak Button 4. **Shows Teleport Option 2
(5:180) show the triggering player's DragonSpeak Button 5. **Shows Teleport Option 3
(5:180) show the triggering player's DragonSpeak Button 6. **Shows Teleport Option 4
(5:180) show the triggering player's DragonSpeak Button 7. **Shows Teleport Option 5
The trigger to close the menu looks very similar to the one that opens it, but it's reversed, and can look something similar to this:
(0:80) When someone clicks DragonSpeak Button 2, **Second Menu Button Clicked
(1:95) and their DragonSpeak Button 2 is visible, **Button Visibility Check
(5:181) hide the triggering player's DragonSpeak Button 2. **Hides Second Menu Button Copy
(5:180) show the triggering player's DragonSpeak Button 1. **Shows First Menu Button Copy
(5:181) hide the triggering player's DragonSpeak Button 3. **Hides Teleport Option 1
(5:181) hide the triggering player's DragonSpeak Button 4. **Hides Teleport Option 2
(5:181) hide the triggering player's DragonSpeak Button 5. **Hides Teleport Option 3
(5:181) hide the triggering player's DragonSpeak Button 6. **HidesTeleport Option 4
(5:181) hide the triggering player's DragonSpeak Button 7. **Hides Teleport Option 5
Now, all that's needed is to put in what each of those buttons do. Here's an example of teleport DS that will occur when a player clicks one of the teleport buttons:
(0:80) When someone clicks DragonSpeak Button 3,
(1:95) and their DragonSpeak Button 3 is visible,
(5:15) move the triggering player to (10,10), or to someplace nearby if it's occupied.
If you would like the menu to close after someone chooses an option, you'll need to add the following DS lines at the end of the trigger where the player clicks an option every time, as follows:
(5:181) hide the triggering player's DragonSpeak Button 2. **Hides Second Menu Button Copy
(5:180) show the triggering player's DragonSpeak Button 1. **Shows First Menu Button Copy
(5:181) hide the triggering player's DragonSpeak Button 3. **Hides Teleport Option 1
(5:181) hide the triggering player's DragonSpeak Button 4. **Hides Teleport Option 2
(5:181) hide the triggering player's DragonSpeak Button 5. **Hides Teleport Option 3
(5:181) hide the triggering player's DragonSpeak Button 6. **Hides Teleport Option 4
(5:181) hide the triggering player's DragonSpeak Button 7. **Hides Teleport Option 5
Note: The reason for this method is because by using the same button, the menu won’t exactly function right, because it will either open and not close, or close and not open, and it will loop, giving the appearance it’s not working at all, when in reality, it’s working, just not as intended.
And there you have it! A special warp button that keeps your interface looking organized and your players happy!
Share this:
-
-
-