
how to create ACTIONS
What exactly is an action? A simple way to think about them to to say an action does something to your object, like making it change color or move to different places. By writing specific instructions to modify your objects, you are actually doing a simple form of coding.
In order to create actions, you must first
understand how to write them. Then, you will need to know how to apply them onto
objects. I will explain both in detail.
Writing an action:
When writing an action, you must write it out perfectly or the program will not understand it. Therefore, be careful and check carefully what you write.
An action basically consists of three parts. Let's do a simple action: create color green. By looking at it, you can probably guess it will turn our object green.
The first part is called the trigger because it tells the program when to apply the action. Here is the list of the three triggers that most of us will use:
create - this means the action will be applied immediately. If we wrote create color green, the object will always be green.
bump - this means the action will be applied when a person touches your object. If we wrote bump color green, the object will only turn green if you touch it.
activate - this means the action will be applied when a person clicks on your object. If we wrote activate color green, the object will only turn green if you click your mouse on the object.
These triggers are very important because changing them will change your world a lot. Think carefully when deciding between them. Remember that bump and activate makes the world more dynamic and allow visitors to control and change their experiences in your world.
The second part of the coding is the action itself. After the computer recognizes that, yes, an action is about to take place, you need to tell it which one. Here are some actions we will learn:
By clicking on the link, you can go to each action.
The final part of an action is the parameters.
Some actions, such as the move command, need you to enter more information, such
as where to go. You must enter this as well.
Applying an action:
Applying an action is very simple. First, choose the object that you want to apply the action to. Then, right click on the object. You will see this:

Notice that there's a textbox that says "Action:"
It is here that you enter the coding for the action that you want. For example,
I put create color blue, which will then
make my object blue.
Applying more than one action:
By clicking one of the links, you will find information how to make an action. But now, let's say I wanted to apply two actions, like I want to make a red car that rotates. Therefore, I need to apply two actions, the color and rotate commands. Thus, I will write create color red, rotate 5. Notice that because both of the actions use the same trigger, I only write it once and use a comma between color and rotate. The object will look like this:

Now you're going to ask me how to incorporate actions with different triggers. For example, I am now going to make an object with both a bump and create action. A good example would be a sign that teleports you to a different place, like the one below.

If you take a look at its coding, it will say
create sign "Mentors and Common Area --------->"; bump
teleport 6S 9E 0a, meaning you make a sign and if you touch it, it
will move to the specified area. Note how the create and bump triggers are
separated by a semicolon (";")
© John Sun 2004. Comments? Problems? Suggestions? Email me.