Difference between revisions of "Executing sub-tasks"

From ADRIFT 5 Manual Wiki
Jump to: navigation, search
m
Line 37: Line 37:
 
|}
 
|}
  
 +
A single ADRIFT task checks its restrictions and if they pass it performs its actions and displays its text.
 +
 +
Basically it is a single IF <restrictions> THEN <perform actions and display text> ELSE <display first failing restriction message> statement.
 +
 +
In most cases this is all you need, but what if you want to output text both before and after the actions, or if you want to perform an action that is more complex than the one's provided by ADRIFT.
 +
 +
No matter what you want to do, it is possible to do it in ADRIFT by using execute-task actions to run sub-tasks that contain extra restrictions, and can operate on the result of an item function instead of the original item references.
  
  
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[General tasks|<<< General tasks]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Main_Page#The_Main_Items|Main_Page]]</TD><TD ALIGN=CENTER>[[How tasks work|How tasks work >>>]]</TD></TABLE>
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[General tasks|<<< General tasks]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Main_Page#The_Main_Items|Main_Page]]</TD><TD ALIGN=CENTER>[[How tasks work|How tasks work >>>]]</TD></TABLE>

Revision as of 12:05, 30 January 2014

THE MAIN ITEMS
Locations
Objects
Tasks
---- Specific
---- General
---- System
---- Executing sub-tasks
---- How tasks work
Characters
Events
Variables
Groups
Properties
Text Overrides
Hints
Synonyms
User functions

A single ADRIFT task checks its restrictions and if they pass it performs its actions and displays its text.

Basically it is a single IF <restrictions> THEN <perform actions and display text> ELSE <display first failing restriction message> statement.

In most cases this is all you need, but what if you want to output text both before and after the actions, or if you want to perform an action that is more complex than the one's provided by ADRIFT.

No matter what you want to do, it is possible to do it in ADRIFT by using execute-task actions to run sub-tasks that contain extra restrictions, and can operate on the result of an item function instead of the original item references.


<<< General tasksMain_PageHow tasks work >>>