Tasks

From ADRIFT 5 Manual Wiki
Revision as of 06:13, 30 January 2014 by Saabie (Talk | contribs) (link)

Jump to: navigation, search
THE MAIN ITEMS
Locations
Objects
Tasks
--- Specific
--- General
--- System
--- How tasks work
Characters
Events
Variables
Groups
Properties
Text Overrides
Hints
Synonyms
User functions

Everything that happens within an ADRIFT adventure is the result of a task. Tasks do things. All tasks have a set of restrictions (conditions that must be met in order for the task to run) and a set of actions (things that will be carried out if the task runs).

There are three main types of task in ADRIFT 5. These are:

Specific tasks Use these to define what happens when the player uses a command on a specific object, character or location, or in specific circumstances
General tasks Use these to define the commands that the player can enter. You create a new general task if you want to use a command (verb) that is not defined in the standard library
System tasks Controls what happens when the player first starts the game or whenever they enter a particular location

How tasks work

Whenever the player types a command into Runner, ADRIFT searches through all of the General tasks in the Standard library as well as those that you have created yourself, trying to find any that match.

It does this is by pattern matching the command against each of the command definition lines in each general task.

In most cases there will only be one general task that matches what the player typed, but if more than one matches it will try the one with the highest Task priority.

All of the restrictions of the general task must pass, otherwise one of two things will happen. If the first restriction that failed contained text, then that message is displayed and the player is prompted for their next command. If however it was blank, then ADRIFT will try the next matching general task in priority order.

ADRIFT now checks the Specific tasks that override that general task, and if it finds one that passes its own restrictions and matches the items that the player refered to, then that specific task is executed (its Actions are performed and the contents of its text box is displayed)

If none of the specific tasks override the general task, then it acts as a default, its actions are performed and its text box contents is displayed.


<<< ObjectsMain_PageSpecific tasks >>>