From ADRIFT 5 Manual Wiki
Jump to: navigation, search

The Actions List

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


  • 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 9 tab pages, one for each category of action that can be performed:


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.


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)


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 general task to be executed uses references such as %character%, %object%, %number% etc., then a button marked "params" appears. Pressing this button will open a separate dialog box for each parameter, one at a time in the order they appear . 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.


Tasks execute multiple times if parameter is a group

If you use a group as a parameter, or any property that has the IconGroup.jpg icon such as %Player%.Held, %Player%.Worn, %object%.Contents etc, then the task is executed once for each item in that group.

If the task has multiple parameters then the task will run once for every possible combination of those parameters.

For example, say you are executing a general task that has the references %object% %character% %location% and you pass the parameters: Player.Held, Player.Location.Characters, Group1.Outdoor

If Player is holding 5 objects, there are 4 characters at players location, and Group1 contains 10 locations, then the task will be run 5*4*10 = 200 times!

  • Use Player.Held not Player.Held.List, we want the keys of the objects not a list of their names.
  • "Outdoor" in Group1.Outdoor is a property added to locations because it is not possible to use the group key by itself as a parameter.
  • The rightmost reference will change every time the task runs, when all of it's items have been exhausted then the next reference will change to it's next item. The leftmost reference will remain the same until all combinations of the other references are run and then it will change to it's next item.


If you tick the "I need a Loop" box then you can enter two numbers that specify a range of values:


This can be used to execute a task multiple times. If you use the loop control variable %Loop% as the %number% parameter passed to the task, then it will be run once for each integer value from the first specified number to the second. The %number% reference of the task will be set to the next %Loop% value each time it runs. eg. If you specify "FOR Loop = -2 to 2" then the task will be run five times, with it's %number% reference set to the values: -2, -1, 0, 1 and 2.

This value can be used to access an element of an array in the called task. If you have a text array variable called "Weekdays", that contains the names of the days of the week, then %Weekdays[%number%]% will print each of the days if you call the task with "FOR Loop = 1 to 7".

  • When you use a %number% reference in any text output from the called task, as we do in this example, then you must turn off the "Aggregate output, where possible" option on the task's "Advanced" page.
  • You cannot use the %Loop% variable to lookup an array in a parameter of the call. You can only pass %Loop% as a number and then do the array lookup in the task.

If a task is already going to run multiple times because you have passed multiple items to it (such as a group or the list of objects held by the player) then it will run the task for all combinations of these items with %Loop% at it's initial value before incrementing %Loop% to the next value and running all of those combinations again. The position of the %number% reference relative to other references does NOT affect this.


The first drop-down list is used to specify whether the variable is to be set to a particular value, or increased/decreased by the given value.

The variable to be changed is selected using the next drop-down list. 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. For a text variable the equation can also produce a string of text.

  • If you select a text variable then the first drop-down can only be set to "Set".
  • If you select an array variable then an extra field will be provided in which you must either:
    1. Select "<Enter own" and enter the number of the array element to write to.
    2. Select a number variable, the value of which will select one of the array elements.
    3. Tick the "I need a loop" box if you want to change several elements of the array.

Either a number, text inside "quotes", or an expression can be entered in the last field to calculate the value to be written to the variable. This equation can use Variables, Properties, References and Functions in the calculation.

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

If "I need a loop" is selected then you can specify a range of index values to write to several elements of the array at once. 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.

If you are also using the increment/decrement options then the calculated value will be added to or subtracted from the current value of that array element.


This set of actions controls the conversations that are defined on the conversation tab of each character.

You can "Ask", "Tell" or "Say" anything to a specific character or to the referenced character.

These actions contain a text entry field which is checked against the conversation items of the selected character.

  • Ask - If any words in the text field match the comma separated list of keywords defined in an "Ask" conversation topic, then the conversation text is shown.
  • Tell - Matches keywords in a "Tell" conversation topic. (The same topic can be both an "Ask" and "Tell" topic simultaniously)
  • Say - Conversation topics with "General command" selected will be matched with the text in the same way that commands in a general task are matched. ie. you can use {} for optional words and [/] for alternate choices.

The final two actions, "Enter conversation" and "Leave conversation" are used to select which character key will be returned by the %convcharacter% function. This character therefor becomes the default character for any ask, tell or say commands entered by the player.

When the player has entered conversation with a character, the restriction [The player character][must][be in conversation with] will return true for that character, until they leave the conversation.

Using any of the Ask, Tell or Say actions will also enter conversation mode with the character.

The "Enter conversation" action is provided so that the character can start a conversation with the player when they enter the location or type a particular command.

When the player enter's into conversation with a character, the implicit introduction will be shown. (If it is defined and they have not entered an explicit introduction)

Leaving the location will also leave the conversation.

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).


Allows the task to skip a certain number of turns. The specified value is added to the %Turns% counter of the game.

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?"

<<< Restrictions listMain PageSettings >>>