Action DefinitionsThis is a featured page

As seen in the anatomy of a behavior page, the action definition panel describes what actually executes when the behavior is run. All of the actions, operators, and object references can be dragged out of the input browser and dropped into the action definition panel.

The UI is completely drag and drop. Actions, objects, attributes, and functions are presented in a navigator and dragged into the behavior editor. For example, the following sets the orientation of the active object to zero:

set orientation

If I want to change the right-hand side from “0″ to some other value, say a copy of another object’s attribute, I simply drag in that attribute:

1. Initially, I can type in a value for orientation.

set orientation 45

2.Instead, I’m dragging over the circle’s orientation attribute.
set orientation mouseover

3. Now my orientation is set equal to the circle’s orientation.
set orientation final


But what if I want to add something to the right-hand side? Select a math function from the logic browser by clicking the Math tab and simply drag it onto the value:

add orientation


:

Dragging the plus function and drop on spaceship’s orientation will automatically pre-populate the first element of the plus statement with whatever was underneath it.

add to orientation final

The comprehensive set of mathematical functions allows any equation to be created.

The logic for boolean operations is similar. Conditional statements are formed by dragging over logic blocks Again, a comprehensive set of boolean operations allow creation of arbitrary logic.

logic view




No user avatar
dale.beermann
Latest page update: made by dale.beermann , Jul 24 2009, 5:23 PM EDT (about this update About This Update dale.beermann update for new arch - dale.beermann

24 words added
89 words deleted
7 images added
11 images deleted

view changes

- complete history)
Keyword tags: actions behaviors
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)