Difference between revisions of "Command keyword"

From Dragon Age Toolset Wiki
Jump to: navigation, search
m (Initial layout for dascript types)
 
m (Updating links)
 
(8 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
== Constructor ==
 
== Constructor ==
  
A constructor is a function that creates an instance of a [[DAScirpt_types|dascript type]].
+
There are several [[Scripting terminology#constructor|constructors]] for a command, for example, [[CommandAttack]] is the attack command's constructor.
 
+
There are several constructors for a command, for example, [[CommandAttack]] is the attack command's constructor.
+
  
 
== Literals ==
 
== Literals ==
  
A literal is a textual representation of a particular value of a type.
+
There is no [[Scripting terminology#literal|literal]] for a command.
 
+
There is no literal for a command.
+
  
 
== Conversion ==
 
== Conversion ==
Line 22: Line 18:
 
The following functions allow a command to exist outside of the scope of the current script by storing it on an object:
 
The following functions allow a command to exist outside of the scope of the current script by storing it on an object:
  
* [[GetLocalCommand]]
+
* [[SetLocalCommand]]
  
The following functions allow a command which exist outside of the scope of the current script to be used in the current script by retrieving it from an object:
+
The following functions allow a command which exists outside of the scope of the current script to be used in the current script by retrieving it from an object:
  
* [[SetLocalCommand]]
+
* [[GetLocalCommand]]
 
      
 
      
 
== Remarks ==
 
== Remarks ==
Line 49: Line 45:
 
[[Command functions]], [[Command constants]]
 
[[Command functions]], [[Command constants]]
  
[[Category: DAScript types]]
+
[[Category:Keywords]]
 +
[[Category:Commands]]

Latest revision as of 12:22, 15 August 2011

The command type represents an instruction for a game object to perform an action.

Constructor

There are several constructors for a command, for example, CommandAttack is the attack command's constructor.

Literals

There is no literal for a command.

Conversion

There is no explicit or implicit conversion to or from a command.

Persistence

The following functions allow a command to exist outside of the scope of the current script by storing it on an object:

The following functions allow a command which exists outside of the scope of the current script to be used in the current script by retrieving it from an object:

Remarks

Commands are added to a game object's command queue using AddCommand and removed using RemoveCommand or RemoveCommandByIndex. All commands and the currently active command can be removed using ClearAllCommands.

Examples

void main()
{
    // uninitialised
    command cDefault;
 
    // initialised using a function
    command cWait = CommandWait(42.0);    
}

See Also

Command functions, Command constants