Data/Effects/Issue Order

(Editor Screenshot Needed)

### Hint

* Issued orders can be queued after previous orders (similar to using shift in game) or can preempt other orders depending on the command flags.
* Be careful to identify these effects as the failure cause of channeled Persistent effects using them. When an order is commanded, any channeled weapon/ability will lose its channel.
* In many cases, be careful of setting the player value to the rightful owner, as an order cannot be issued from player to its enemy. For example, if the unit that receives the order is the caster, any effect preceding the Issue Order effect that results in a point, or an enemy target will fail this effect, IF the Player Value remains at "Target" value; Because that "Target" value checks the player of the previous effect (unless an effect oriented to caster is specified).

## Example Usage

### Progammer's Lagless WASD movement

The issue order from Progammer's Lagless WASD movement. Which is used by create persistent effects with offsets to order a unit to move to a location relative to the unit in the respective direction.

### Quickshot14's Unit Ability Ordering Another Unit To Attack Target

A series of videos surrounding the use of issue order effects to create an ability to issue orders to surrounding units to attack the target of the ability.

### Calldown MULE (Issue Order)

(Advanced) Issue Order effect that uses the initial effect of the ability as a frame of reference to order the MULE to gather after being created.

#### URL

Available in the Data Editor for Liberty Dependency

## Fields Description

### Ability - Ability

* Ability that is ordered to be used.
* Will use the Ability - Set ID from this ability to order the use of other abilities that share the ID)

### Ability - Command

* Index of the ability command issued as specified under the ability's commands field.
* Usually in the order found under the Ability - Commands - Default Button field with the top being 0 and going down in incrementing order
* May be used for build, train and research commands to specify the index of the unit/upgrade to order.
* Apparently does not work for the Turn command of the Move ability
* (Unknown) What effect it has on the Specialize ability

### Editor - Editor Categories

* Categories for this effect to determined which race folder it is applied under.

### Editor - Editor Comment

* Comments for the effect
* Warning having too much in this field can cause spontaneous deletion of random effects

### Effect - Chance

* Chance from 0 to 1 the effect will fire when applied.

### Effect - Command Flags

Determines how the effect interacts with the unit.

* **AI Heroes (for internal use):** (Unknown)
* **AI Ignore on Finish (for internal use):** (Unknown)
* Alternate: (Unsure) Something to do with alternating in the order queue not sure how specifically.
* **Attack Once:** When issuing an attack order, it is now allowed to issue an “attack once” order with order command flags. This doesn't affect a unit attacking an enemy unit, but does if the order is directed at a friendly unit.
* **DataA (for internal use):** (Unknown)
* **DataB (for internal use):** (Unknown)
* **Instant building placement at the unit's own position:** Although this flag seems explicit from its name, it is not clearly necessary since a unit can be ordered to build on spot without this.
* **Is Order (for internal use):** (Unknown)
* **Preempt:** Is added to the beginning of the order queue. All previous orders are issued after. This is handy in some situation, for example, if an issue order effect is used which would override the following action, preempt will prevent the other commands from being replaced. As an example: You order a unit to attack a friendly unit, but in that weapon, there is a Pre Effect that leads to an "Issue Order" effect, commanding to use another ability just before the weapon's attack; this would cause the unit to stop attacking the friendly unit after the ability is used. In that case, Preempting the order will prevent the initial command from being disrupted.
* **Queued:** Adds the order to the end of the order queue. All previous orders are issued before.

* **Repeats until canceled:** (Unsure, untested)

* **Set Auto Cast:** Enables the effect modify the auto-cast on/off state. By default, this flag always toggles off the auto-cast (can be toggled back manually). Does not set/unset an ability Auto Cast flag. Activating this field means that this effect will not activate the ability, but only work on it's auto-cast state. Setting the ability is still required to specify which ability is in the scope.
* **Set Auto Cast On:** (Only works with the previous field enabled) Inverts the previous flag's effect to always toggle on the auto-cast instead (can be toggled back manually).
* **Smart Click:** (Unsure) Smart is usually associated with right clicking. Will not set a non-Smart ability to be right-click capable.
* **Smart Rally:** (Unsure) Seems to be that the unit will go to the order that has the nearest target first
* **Subgroup:** (Unsure) Somehow if the units are selected it issues only to the units in the subgroup of whats selected?
* **To Selection:** (Unknown)

### Effect - Player - Effect

* Effect that is a parent of this effect in the effect tree used as a frame of reference for determining the Effect - Player - Value

### Effect - Player - Value

* The Player associated to this effect (if it's not a player that can order that unit it might not work).

### Effect - Response Flags

* The way units respond to being targeted by this effect based in their settings in the Behavior - Response field of the Units data type.
* Acquire: Units Acquire the source unit of the effect
* Flee: Units flee from the location of the source of the effect

### Effect - Validators

* Validators that must return true for the effect to occur.

### Target - Target - Effect

* The effect used as a frame of reference for caster/target/source/etc for the target of the effect
* If this effect was created by a chain of effects, the effect specified here must be a previous effect in the same branch of the effect tree

### Target - Target - Value

* The target of the order.
* If the value is Target Unit and Target - Target - Effect is not specified then the target is the unit this effect is applied to.
* Caster: Unit that started casting the effect tree that applied this effect
* Outer: A unit that is not the caster, source or target
* Source: The unit or point that directly cast the effect.
* Target: Target of this effect.
* Unit Origin: (Unknown)
* Unknown: (Unknown)

### Unit - Unit - Effect

* The effect from a previous part of the branch in the effect tree used as a frame of reference for caster/target/source/etc for determining the unit issued the order.
* Could be used for units attacking the previous unit struck by a bouncing chain lightning like effect.

### Unit - Unit - Value

* The Unit being issued the order.
* Caster: Unit that started casting the effect tree that applied this effect
* Outer: A unit that is not the caster, source or target
* Source: The unit or point that directly cast the effect.
* Target: Target of this effect unless specified otherwise by the Unit - Unit - Effect.
* Unit Origin: (Unknown)
* Unknown: (Unknown)