DragonSpeak 101
DragonSpeak is the programming language
used to create effects in dreams. You can make things open and close, play
sounds and music, make things appear and disappear, or move furres around
like a ride. You do not have to be a brilliant programmer to use DS: it's
very user-friendly and easy to learn. Let's get to it!
Causes and Effects The simplest DragonSpeak command consists of two parts, a CAUSE (or trigger) and an EFFECT. The DS wants to know WHEN to do something (cause) and WHAT to do (effect.) Here's an example: (0:9) When a furre arrives in the dream,
[CAUSE]
This little script will cause a bell to sound whenever someone enters your dream. Easy, huh? You could change the number 13 to something else in order to play a different sound. The list of sounds and their numbers can be found in your Furcadia folder as the sound.ini file. Open it in Notepad to read it. Conditions We can also use CONDITIONS to make our DragonSpeak even more intelligent. These are extra, optional parameters you place between the CAUSE and the EFFECT. When a CAUSE occurs, the program will then check for any CONDITIONS you may have specified to see if it is ok to go ahead and do the EFFECT. Let's use our script above and add a condition. (0:9) When a furre arrives in the dream,
[CAUSE]
This script checks when a furre enters the dream and if they happen to be an equine, it plays the sound of a horse. Suppose a feline entered the dream. Nothing would happen because of the CONDITION we added. This script would only execute when an equine enters the dream. Areas Using the AREA parameter we can specify WHERE an effect should take place. If you do not specify an area, your effect will happen everywhere on the map. So AREA allows us to pinpoint a location for an effect to take place. Let's look at a simple script that uses area: (0:7) When somebody moves into position
(20,10), [CAUSE]
This script says "when a furre moves into
the square at location 20,10
The problem is it doesn't say WHERE to put the pillow. If we ran that script we would have the whole map covered in yellow pillows - ouch! Let's tell it where we want pillows: (0:7) When somebody moves into position
(20,10), [CAUSE]
There. Now we can move into location 20,10 and magically produce a small area filled with pillows nearby, thanks to the AREA parameter. Filters Filters work like the AREA command: they limit where an effect takes place. Here's a short script to show how filters work. (0:19) When someone uses object type
50 [CAUSE]
In this script, using object 30 (a rose) will cause plants to grow anyplace on the map where you have the dark soil tile 127. A magic garden! The filter prevents plants from popping up all over the map. Review You have enough background now to create some pretty amazing effects in your dreams. You know that all you really need is a CAUSE and an EFFECT, but the optional CONDITIONS, AREAS, and FILTERS allow you a lot more flexibility in when and where things happen. The next section of this course covers using tirggers in detail. Happy Dreaming!
|