Actions

From ADRIFT 5 Manual Wiki
Revision as of 02:55, 15 October 2011 by Saabie (Talk | contribs) (Page link)

Jump to: navigation, search

The Actions List

The "Actions" tab of a task contains a list of actions which are performed in order when a task is executed and passes all of its restrictions.

TaskActionsList.jpg

  • The order of execution can be changed by selecting an action and moving it up or down with the arrow buttons at the right of the window.
  • Pressing the "Add" button opens the action editing window (below), creating a new action which is added to the end of the list.
  • Select one of the actions and press the "Edit" button to open the action editing window and alter it.
  • Select an action and press "Delete" to remove it.

The action editing window contains 8 tab pages, one for each category of action that can be performed:

ActionSetVariable.jpg

Move Objects

This has 3 main options: move an object, add object to group, and remove object from group. The object can be:

  • A specific object
  • The object "Referenced" by the general task, ie. for "Eat %object%" if the player enters "eat fruit" then fruit becomes the referenced object.
  • Every object at a given location
  • Everything held by a particular character
  • Everything in a given object group
  • The contents of a particular container
  • Everything sitting on a particular object that has a surface
  • All objects with a particular property, or a property with a particular value
  • Everything currently being worn by a particular character

The character holding or wearing the object can also be a referenced character, and the object its on or in can be a referenced object.

As well as adding or removing the selected object from a group, the object can be moved to:

  • Inside a container object
  • Onto an object with a surface
  • Can become a non-removable 'part' of another object
  • Held by a character
  • Worn by a character
  • Can become a 'part' of a character, such as his feet or nose
  • Moved to a particular location, or to the same location as a referenced/particular object or character
  • A random location in a location group
  • The special location "Hidden" for objects that have been destroyed or taken away to where the player cant find them

Any of these characters and objects can also be a referenced character/object.

Move Characters

Characters can be moved to a new location, or added to (or removed from) a character group. One or more characters can be selected from:

  • The player character
  • A Referenced character
  • A particular character
  • Everyone at a particular location
  • Everyone in a character group
  • Everyone inside a particular container object (such as an elevator or car)
  • Everyone on a particular object with a surface
  • Everyone who has a particular property set to a particular value

The selected character(s) can be moved to:

  • A specific location (but NOT to a referenced location)
  • The special 'Hidden' location that removes the character from the game world
  • A random location chosen from a particular location group
  • Laying, sitting or standing on or in an appropriate object or character such as a bed, chair, car, elevator, horse or the floor (can be a referenced object)
  • The parent location (to get out of or off of an object)
  • The same location as a specific object or character
  • Switch places with another character
  • A specific direction from the current location

This action can also be used to change the "point of view" of the player, allowing them to play as different characters in the game world. Use [move][character][the player character][to switch places with] the character they are to play as.

Locations

This option adds and removes locations from location groups. The location can be:

  • A specific location
  • The current location of a specific or referenced character or object
  • Every location that has a specific property with a given value
  • All of the locations in another group
  • Every location in the same group (if used with remove this will leave the group completely empty)

Tasks

The task actions allow you to either execute or unset another task. This task can be of any type, general, specific or system. Unsetting a task simply clears the flag that indicates that the task has been run at least once. This allows a non-repeatable task to be run again.

When an action executes a task, this new task acts like a subroutine, checking its restrictions are valid, displaying its own text box and running its own actions before returning to complete the remaing actions in the first task.

If the task to be executed uses references such as %character%, %object%, %number% etc., then a button marked "params" appears. Pressing this button will open a dialog box for each parameter. This can pass on the referenced item from the first task, specify a particular item to use, or use a formulae to calculate the value to be passed to the sub-task.

Variables

A variable is selected using the drop-down list and then an expression can be entered which calculates the value to be written to the variable. This equation can use Variables, Properties, References and Functions in the calculation, surrounding them with % symbols ie. %object%. There are two types of variable, 'number' and 'text', either of which can can be an array. For a number variable the equation must calculate an integer value. eg. if the counter variable is set equal to %counter%+1 then it will be incremented each time the action is executed. For a text variable the equation can also produce a string of text.

  • A future version of Adrift will include an "expression builder" that will assist with creating more complex equations.

If the variable is an array then an extra field will be provided in which a specific array index may be given or a number variable used to index the element of the array to be written to. An extra option "I need a loop" is also made available. If this is selected then you can specify a range of index values to write to several elements of the array. This functions like a for loop in a programming language, recalculating the expression for each array index in the sequence. The counter variable %loop% contains the index being written to and can be used in the expression as a value or to index into another array. eg. "Set [MyArray][Loop]=[%MyArray[%Loop%]+1]" will increment each element of MyArray.

Conversation

Not available yet (Adrift version 5.0.21)

Set Properties

It is important to note that the IconDynamicObject.jpg icon at the left of the entry fields is actually a button that toggles between 3 states and determines what is listed in the first drop-down menu.

IconDynamicObject.jpg = Objects

IconCharacters.jpg = Characters

IconLocation.jpg = Locations

Objects and characters can be either specific or referenced. Once the object, character or location is chosen, a list of applicable properties can be selected from the next drop-down list. Finally the value to be assigned to that property can either be chosen from a drop-down list, or an expression entered to calculate it (depending on the type of the property).

End Game

This is the simplest tab and only has 3 options, all of which end the game:

  • in Victory - (Displays "*** You have won ***")
  • in Defeat - (Displays "*** You have lost ***")
  • without a fuss - (no extra message displayed)

The "End of Game" message is then displayed (see Introduction & End of Game), followed by the line: "Would you like to restart, restore a saved game, quit or undo the last command?"