ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Difference between revisions of "ScriptTypes/TeamMissionTypes"

From ModEnc
Jump to: navigation, search
(Update and formatting)
(Cleaned up the formatting and updated bits of information)
Line 1: Line 1:
0,n = Attack Target Type, n = target type to attack.
+
{|class="wikitable"
 
+
!colspan="2"|Parameters
 +
!rowspan="2"|Description
 +
|-
 +
!P1 (Action)
 +
!P2 (Argument)
 +
|-
 +
|0
 +
|Target Type#{{fnl|1}}
 +
|'''Attack Target Type'''
 
This instructs the TeamType to use the TaskForce to approach and attack the target specified by the second parameter. These attack script actions are inherently self repeating. For example, when executing script action attack structure (0,2), the task force will attack the next structure when the current structure being attacked is destroyed and will continue to destroy enemy buildings until there are no more left. When no more target is left to attack, the script action is complete and the task force moves on to execute its next script action. The completion of this script action could get cut-short in cases the task force gets destroyed or runs out of ammo. Check [[TargetDistanceCoefficientDefault]] as it affects the target selection of these script actions. The following are the target types which can be used:
 
This instructs the TeamType to use the TaskForce to approach and attack the target specified by the second parameter. These attack script actions are inherently self repeating. For example, when executing script action attack structure (0,2), the task force will attack the next structure when the current structure being attacked is destroyed and will continue to destroy enemy buildings until there are no more left. When no more target is left to attack, the script action is complete and the task force moves on to execute its next script action. The completion of this script action could get cut-short in cases the task force gets destroyed or runs out of ammo. Check [[TargetDistanceCoefficientDefault]] as it affects the target selection of these script actions. The following are the target types which can be used:
+
{|class="wikitable"
  0         N/A             cancel attack mission
+
!Value
  1         Anything         anything [VehicleTypes], [AircraftTypes], [InfantryTypes] and [BuildingTypes]
+
!Target Type
  2         Structures       any enemy [BuildingTypes]
+
!Description
  3         Ore Miners       any enemy [VehicleTypes] with {{f|Harvester|yes|link}} set
+
|-
  4         Infantry         any enemy [InfantryTypes]
+
|0
  5         Vehicles         any enemy [VehicleTypes]
+
|N/A
  6         Factories       any enemy [BuildingTypes] with a {{f|Factory||link}} setting
+
|cancel attack mission
  7         Base Defenses   any enemy [BuildingTypes] with {{f|IsBaseDefense|yes|link}} set
+
|-
  8         Base Threats     any enemy objects approaching (or already in) its base and which are in an attack mission
+
|1
  9         Power Plants     any enemy [BuildingTypes] with positive {{f|Power||link}} values set
+
|Anything
10         Occupiable       any [BuildingTypes] with {{f|CanBeOccupied|yes|link}} set (usually neutral structures) (not in TS)
+
|anything [VehicleTypes], [AircraftTypes], [InfantryTypes] and [BuildingTypes]
11         Tech Buildings   any [BuildingTypes] with {{f|NeedsEngineer|yes|link}} set (usually {{f|NeutralTechBuildings||link}}) (not in TS)
+
|-
 
+
|2
NOTE: in Yuri's Revenge, Occupiable structures are defined by having {{f|CanOccupyFire|yes|link}} set instead of {{f|CanBeOccupied|yes|link}}.
+
|Structures
+
|any enemy [BuildingTypes]
1,n = Attack Waypoint, n = waypoint number to attack
+
|-
 
+
|3
 +
|Ore Miners
 +
|any enemy [VehicleTypes] with {{f|Harvester|yes|link}} set
 +
|-
 +
|4
 +
|Infantry
 +
|any enemy [InfantryTypes]
 +
|-
 +
|5
 +
|Vehicles
 +
|any enemy [VehicleTypes]
 +
|-
 +
|6
 +
|Factories
 +
|any enemy [BuildingTypes] with a {{f|Factory||link}} setting
 +
|-
 +
|7
 +
|Base Defenses
 +
|any enemy [BuildingTypes] with {{f|IsBaseDefense|yes|link}} set
 +
|-
 +
|8
 +
|Base Threats
 +
|any enemy objects approaching (or already in) its base and which are in an attack mission
 +
|-
 +
|9
 +
|Power Plants
 +
|any enemy [BuildingTypes] with positive {{f|Power||link}} values set
 +
|-
 +
!colspan="3"|{{Ra2}} additions
 +
|-
 +
|10
 +
|Occupiable
 +
|any [BuildingTypes] with {{f|CanBeOccupied|yes|link}} set (usually neutral structures)
 +
|-
 +
|11
 +
|Tech Buildings
 +
|any [BuildingTypes] with {{f|NeedsEngineer|yes|link}} set (usually {{f|NeutralTechBuildings||link}})
 +
|}
 +
|-
 +
|1
 +
|Waypoint#{{fnl|1}}
 +
|'''Attack Waypoint'''
 
This instructs the TeamType to use the TaskForce to attack the waypoint number specified by the second parameter. If any members have {{f|Infiltrate|yes|link}} set they will enter the structure at the waypoint. Members with {{f|Engineer|yes|link}} set will capture the structure provided it does not have {{f|Capturable|no|link}} set or if it has {{f|NeedsEngineer|yes|link}} set. Members with {{f|Agent|yes|link}} set will spy on the structure if it has {{f|Spyable|yes|link}} set. Members that do not have {{f|Assaulter|no|link}} set will garrison the structure if it has {{f|CanBeOccupied|yes|link}} set. Members with {{f|C4|yes|link}} set will blow up the structure if does not have {{f|CanC4|no|link}} set. If there is no building at the specified waypoint, the TaskForce will attack the ground when reaching in range of the waypoint. Refer [[Waypoints]] for details on waypoint.
 
This instructs the TeamType to use the TaskForce to attack the waypoint number specified by the second parameter. If any members have {{f|Infiltrate|yes|link}} set they will enter the structure at the waypoint. Members with {{f|Engineer|yes|link}} set will capture the structure provided it does not have {{f|Capturable|no|link}} set or if it has {{f|NeedsEngineer|yes|link}} set. Members with {{f|Agent|yes|link}} set will spy on the structure if it has {{f|Spyable|yes|link}} set. Members that do not have {{f|Assaulter|no|link}} set will garrison the structure if it has {{f|CanBeOccupied|yes|link}} set. Members with {{f|C4|yes|link}} set will blow up the structure if does not have {{f|CanC4|no|link}} set. If there is no building at the specified waypoint, the TaskForce will attack the ground when reaching in range of the waypoint. Refer [[Waypoints]] for details on waypoint.
+
|-
2,0 = Go Berzerk
+
|2
 
+
|0
 +
|'''Go Berzerk'''
 
Forces infantry units with {{f|Cyborg|yes|link}} set to go berserk (they consider all objects, including friendly units, equally in their threat scan).(Doesn't seem to work).
 
Forces infantry units with {{f|Cyborg|yes|link}} set to go berserk (they consider all objects, including friendly units, equally in their threat scan).(Doesn't seem to work).
+
|-
3,n = Move To Waypoint, n = waypoint number to move to
+
|3
 
+
|Waypoint#{{fnl|1}}
 +
|'''Move To Waypoint'''
 
This instructs the TeamType to use the TaskForce to move to the waypoint number specified by the second parameter. Refer [[Waypoints]] for details on waypoint. TIP: you could use this script action to get a TeamType to move to Waypoint= number 99 (just about every map has this defined as the center point) - that will mean it will always strive to get to the center of the map, providing a good vantage point from which to perform further script actions and giving the impression that the computer is scouting for enemies.
 
This instructs the TeamType to use the TaskForce to move to the waypoint number specified by the second parameter. Refer [[Waypoints]] for details on waypoint. TIP: you could use this script action to get a TeamType to move to Waypoint= number 99 (just about every map has this defined as the center point) - that will mean it will always strive to get to the center of the map, providing a good vantage point from which to perform further script actions and giving the impression that the computer is scouting for enemies.
+
|-
4,n = Move Into Specific Celltag, n = celltag to move into
+
|4
 
+
|CellTag#{{fnl|1}}
 +
|'''Move Into Specific Celltag'''
 
This instructs the TeamType to use the TaskForce to move into the CellTag specified by the second parameter. This is used when you want the TeamType to trigger a specific Action (when the game tests for the CellTag being entered). CellTags are attached to cells and are used to trigger Events and thus fire Actions when that cell is entered by a unit (or any unit from the TaskForce). The CellTag parameter should be the waypoint parameter for that CellTag from the [CellTags]listing in the map file, hence this script action is only of use on specific map files. Refer [[CellTags]] for details on celltag.
 
This instructs the TeamType to use the TaskForce to move into the CellTag specified by the second parameter. This is used when you want the TeamType to trigger a specific Action (when the game tests for the CellTag being entered). CellTags are attached to cells and are used to trigger Events and thus fire Actions when that cell is entered by a unit (or any unit from the TaskForce). The CellTag parameter should be the waypoint parameter for that CellTag from the [CellTags]listing in the map file, hence this script action is only of use on specific map files. Refer [[CellTags]] for details on celltag.
+
|-
5,n = Guard Area, n = time to guard area in tenths of a minute (multiples of 6 seconds)
+
|5
 
+
|Time{{fnl|2}}
This instructs the TeamType to put the TaskForce into Guard Mode (same effect as selecting a group of units and pressing the Guard Mode key as defined in KEYBOARD.INI or clicking the relevant button on the Advanced Command Bar). Units will move to attack enemy units that fall within their range.
+
|'''Guard Area'''
+
This instructs the TeamType to put the TaskForce into Guard Mode (same effect as selecting a group of units and pressing the Guard Mode key as defined in [[Keyboard.ini|KEYBOARD.INI]] or clicking the relevant button on the Advanced Command Bar). Units will move to attack enemy units that fall within their range.
6,n = Jump To Script Action, n = line number of script action to jump to.
+
|-
 
+
|6
This is used to repeat actions within the ScriptType. The second parameter is the action line number of the ScriptType that you want to jump to. Script Action index starts at 0 whereas the line number starts at 1. So, to jump to the first Script Action whose index is 0, use n=6,1 for this script. Jump to line number could be specified to any of the preceding line numbers, not just to the first Script Action to create a loop of Script Actions.
+
|Action#{{fnl|1}}
+
|'''Jump To Script Action'''
7,0 = Force Player Win
+
This is used to repeat actions within the ScriptType. The second parameter is the action line number of the ScriptType that you want to jump to.<br/>'''Note''': Script Action index starts at 0 whereas the line number starts at 1. So, to jump to the first Script Action whose index is 0, use n=6,1 for this script. Jump to line number could be specified to any of the preceding line numbers, not just to the first Script Action to create a loop of Script Actions.
 
+
|-
 +
|7
 +
|0
 +
|'''Force Player Win'''
 
Forces a game win condition for the owner of the TeamType (they win the game).
 
Forces a game win condition for the owner of the TeamType (they win the game).
+
|-
8,n = Unload, n = type of unloading
+
|8
 
+
|Unload Behaviour#{{fnl|1}}
 +
|'''Unload'''
 
If the TaskForce contains a unit or units that have a valid {{f|Passengers||link}} value set, and those units contain passengers, this command will make the units inside the transport(s) disembark. Note that once the passengers have disembarked, the transport itself is suspended until given a new mission and is therefore no longer considered a part of this TaskForce - this means that you cannot, for example, get units to disembark, do something, then get back into the transport in the same script. The second parameter can be used to control what happens to the transport after it 'deploys' its cargo:
 
If the TaskForce contains a unit or units that have a valid {{f|Passengers||link}} value set, and those units contain passengers, this command will make the units inside the transport(s) disembark. Note that once the passengers have disembarked, the transport itself is suspended until given a new mission and is therefore no longer considered a part of this TaskForce - this means that you cannot, for example, get units to disembark, do something, then get back into the transport in the same script. The second parameter can be used to control what happens to the transport after it 'deploys' its cargo:
 
+
{|class="wikitable"
0         Keep transports and units - all remain in the team and execute the remainder of the script
+
!Value
1         Keep transport and lose the units - only the transport will execute the remainder of the script
+
!Description
2         Lose transport and keep units - only the units will execute the remainder of the script
+
|-
3         Lose transports and lose units - nothing executes the remainder of the script
+
|0
 
+
|Keep transports and units - all remain in the team and execute the remainder of the script
9,0 = Deploy
+
|-
 
+
|1
 +
|Keep transport and lose the units - only the transport will execute the remainder of the script
 +
|-
 +
|2
 +
|Lose transport and keep units - only the units will execute the remainder of the script
 +
|-
 +
|3
 +
|Lose transports and lose units - nothing executes the remainder of the script
 +
|}
 +
|-
 +
|9
 +
|0
 +
|'''Deploy'''
 
If the TaskForce contains a unit or units that are able to deploy (for example a unit which {{f|DeploysInto||link}} a [BuildingType] or has any of {{f|Deployer|yes|link}}, {{f|DeployFire|yes|link}}, {{f|DeployToFire|yes|link}} set) then this action causes them to deploy at the current cell they are occupying (same effect as selecting a unit and pressing the Deploy key as defined in KEYBOARD.INI or clicking the relevant button on the Advanced Command Bar).
 
If the TaskForce contains a unit or units that are able to deploy (for example a unit which {{f|DeploysInto||link}} a [BuildingType] or has any of {{f|Deployer|yes|link}}, {{f|DeployFire|yes|link}}, {{f|DeployToFire|yes|link}} set) then this action causes them to deploy at the current cell they are occupying (same effect as selecting a unit and pressing the Deploy key as defined in KEYBOARD.INI or clicking the relevant button on the Advanced Command Bar).
+
|-
10,0 = Follow friendlies
+
|10
 
+
|0
 +
|'''Follow friendlies'''
 
This command causes the TaskForce to follow the nearest friendly unit when it moves although it will not function as if it is 'guarding' the unit. The following is not permanent, when the TaskForce is assigned another mission it abandons the following. TIP: If the support TeamType has this as the first line in its ScriptType, then it will escort the first TeamType.
 
This command causes the TaskForce to follow the nearest friendly unit when it moves although it will not function as if it is 'guarding' the unit. The following is not permanent, when the TaskForce is assigned another mission it abandons the following. TIP: If the support TeamType has this as the first line in its ScriptType, then it will escort the first TeamType.
+
|-
11,n = Assign New Mission, n = new mission type
+
|11
 
+
|Mission#{{fnl|1}}
 +
|'''Assign New Mission'''
 
The objects in the TaskForce are assigned the new mission defined by the second parameter. The actions such as Sleep/Sticky/Guard/Area Guard/Hunt etc. changes the state/mission in which the units are and those remain in that state until those units are destroyed or recruited into another team and given a different command. These actions are never ending, so these can't finish and move to next script action. Such script actions are given as the last script action in their scripts. The following are valid settings for the second parameter:
 
The objects in the TaskForce are assigned the new mission defined by the second parameter. The actions such as Sleep/Sticky/Guard/Area Guard/Hunt etc. changes the state/mission in which the units are and those remain in that state until those units are destroyed or recruited into another team and given a different command. These actions are never ending, so these can't finish and move to next script action. Such script actions are given as the last script action in their scripts. The following are valid settings for the second parameter:
 
+
{|class="wikitable"
For RA2/YR:
+
|-
  0         Sleep                   object sits around and plays dead, will not acquire targets
+
!Value
  1         Attack                   special attack mission used by AI team types (utilizes threat rating logic)
+
!Name
  2         Move                     simply moving to destination
+
!Description
  3         QMove                   special move to destination after other queued moves occur
+
|-
  4         Retreat                 object runs away (may even leave the map)
+
!colspan="3"|{{ts}} and {{fs}}
  5         Guard                   object sits around and will engage an enemy that falls within its weapon range
+
|-
  6         Sticky                   just like guard mode, except the object will engage enemies but not pursue them
+
|0
  7         Enter                   enter building or transport
+
|Sleep
  8         Capture                 engineer entry logic used by MultiEngineer
+
|object sits around and plays dead, will not acquire targets
  9         Eaten                    when object is being repaired (applies only to structures)
+
|-
10        Harvest                 the loop controlling harvesting of Ore and dumping at a Refinery
+
|1
11        Area Guard               guard the general area where the object starts at
+
|Attack
12        Return                   return to co-ordinating object (e.g. spawned object returns to the spawner)
+
|special attack mission used by AI team types (utilizes threat rating logic)
13        Stop                     stop moving or firing at the first available opportunity
+
|-
14        Ambush                   force fire (units with {{f|Infiltrate|yes|link}} will enter target if possible)
+
|2
15        Hunt                     scan for and attack enemies wherever they may be on the map
+
|Move
16        Unload                   while dropping off cargo (e.g. Landing Craft unloading passengers)
+
|simply moving to destination
17        Sabotage                 unit runs to place C4 on a building or Ivan goes to place bomb on object
+
|-
18        Construction             structures use this when building up after initial placement
+
|3
19        Selling                 structures use this for deconstruction after being sold
+
|QMove
20        Repair                   used when repairing an object (e.g. Service Depot)
+
|special move to destination after other queued moves occur
21        Rescue                   special team over-ride mission
+
|-
22        Missile                 Nuke Silo special launch missile mission
+
|4
23        Harmless                 object doesn't fire and is not considered in any threat scan
+
|Retreat
24        Open                     while opening or closing a gate to allow passage
+
|object runs away (may even leave the map)
25        Patrol                   patrol a series of waypoints
+
|-
26        Paradrop Approach        object is approaching the paradrop site
+
|5
27        Paradrop Overfly        object is flying over the paradrop site (i.e. dropping the paratroopers)
+
|Guard
28        Wait                    paused and awaiting next mission
+
|object sits around and will engage an enemy that falls within its weapon range
29        Move                    (special duplicate) used when Chrono units are moving to destination
+
|-
30        Attack                  (special duplicate) used when units are deployed to fire (e.g. weapons with an area fire effect)
+
|6
31        Spyplane Approach        object is flying towards target (YR only)
+
|Sticky
32        Spyplane Overfly        object is flying over the target (YR only)
+
|just like guard mode, except the object will engage enemies but not pursue them
 
+
|-
For TS:
+
|7
0          Sleep                    object sits around and plays dead, will not acquire targets
+
|Enter
1         Attack                   special attack mission used by AI team types (utilizes threat rating logic)
+
|enter building or transport
2         Move                     simply moving to destination
+
|-
3         QMove                   special move to destination after other queued moves occur
+
|8
4         Retreat                 object runs away (may even leave the map)
+
|Capture
5         Guard                   object sits around and will engage an enemy that falls within its weapon range
+
|engineer entry logic used by MultiEngineer
6         Sticky                   just like guard mode, except the object will engage enemies but not pursue them
+
|-
7         Enter                   enter building or transport
+
|9
8         Capture                 engineer entry logic used by MultiEngineer
+
|Harvest
9         Harvest                 the loop controlling harvesting of tiberium and dumping at a Refinery
+
|the loop controlling harvesting of tiberium and dumping at a Refinery
10        Area Guard               guard the general area where the object starts at
+
|-
11        Return                   return to co-ordinating object (e.g. spawned object returns to the spawner)
+
|10
12        Stop                     stop moving or firing at the first available opportunity
+
|Area Guard
13        Ambush                   force fire (units with Infiltrate=yes will enter target if possible)
+
|guard the general area where the object starts at
14        Hunt                     scan for and attack enemies wherever they may be on the map
+
|-
15        Unload                   while dropping off cargo
+
|11
16        Sabotage                 unit runs to place C4 on a building
+
|Return
17        Construction             structures use this when building up after initial placement
+
|return to co-ordinating object (e.g. spawned object returns to the spawner)
18        Selling                 structures use this for deconstruction after being sold
+
|-
19        Repair                   used when repairing an object (e.g. Service Depot)
+
|12
20        Rescue                   special team over-ride mission
+
|Stop
21        Missile                 Nuke Silo special launch missile mission
+
|stop moving or firing at the first available opportunity
22        Harmless                 object doesn't fire and is not considered in any threat scan
+
|-
23        Open                     while opening or closing a gate to allow passage
+
|13
24        Patrol                   patrol a series of waypoints
+
|Ambush
 
+
|force fire (units with Infiltrate=yes will enter target if possible)
12,n = Set Global, n = global number to be set
+
|-
 
+
|14
The global number specified in the second parameter is defined as being 'set' (it is allocated a value of '1' or 'true'). This should be employed in specific map files only. This is part of the boolean logic employed by the global variables system in the game engine.
+
|Hunt
+
|scan for and attack enemies wherever they may be on the map
13,n = Play Idle Anim Sequence, n = sequence number
+
|-
 
+
|15
If the TaskForce contains a unit or units that are SHPs (i.e. infantry) then the relevant idle SHP sequence is displayed as defined by the frame numbering system in ART.INI.
+
|Unload
+
|while dropping off cargo
14,0 = Load Onto Transport
+
|-
 
+
|16
 +
|Sabotage
 +
|unit runs to place C4 on a building
 +
|-
 +
|17
 +
|Construction
 +
|structures use this when building up after initial placement
 +
|-
 +
|18
 +
|Selling
 +
|structures use this for deconstruction after being sold
 +
|-
 +
|19
 +
|Repair
 +
|used when repairing an object (e.g. Service Depot)
 +
|-
 +
|20
 +
|Rescue
 +
|special team over-ride mission
 +
|-
 +
|21
 +
|Missile
 +
|#{{fnl|1}}uke Silo special launch missile mission
 +
|-
 +
|22
 +
|Harmless
 +
|object doesn't fire and is not considered in any threat scan
 +
|-
 +
|23
 +
|Open
 +
|while opening or closing a gate to allow passage
 +
|-
 +
|24
 +
|Patrol
 +
|patrol a series of waypoints
 +
|-
 +
!colspan="3"|{{Ra2}} and {{Yr}}
 +
|-
 +
|0
 +
|Sleep
 +
|object sits around and plays dead, will not acquire targets
 +
|-
 +
|1
 +
|Attack
 +
|special attack mission used by AI team types (utilizes threat rating logic)
 +
|-
 +
|2
 +
|Move
 +
|simply moving to destination
 +
|-
 +
|3
 +
|QMove
 +
|special move to destination after other queued moves occur
 +
|-
 +
|4
 +
|Retreat
 +
|object runs away (may even leave the map)
 +
|-
 +
|5
 +
|Guard
 +
|object sits around and will engage an enemy that falls within its weapon range
 +
|-
 +
|6
 +
|Sticky
 +
|just like guard mode, except the object will engage enemies but not pursue them
 +
|-
 +
|7
 +
|Enter
 +
|enter building or transport
 +
|-
 +
|8
 +
|Capture
 +
|engineer entry logic used by MultiEngineer
 +
|-
 +
|9
 +
|Eaten
 +
|when object is being repaired (applies only to structures)
 +
|-
 +
|10
 +
|Harvest
 +
|the loop controlling harvesting of Ore and dumping at a Refinery
 +
|-
 +
|11
 +
|Area Guard
 +
|guard the general area where the object starts at
 +
|-
 +
|12
 +
|Return
 +
|return to co-ordinating object (e.g. spawned object returns to the spawner)
 +
|-
 +
|13
 +
|Stop
 +
|stop moving or firing at the first available opportunity
 +
|-
 +
|14
 +
|Ambush
 +
|force fire (units with {{f|Infiltrate|yes|link}} will enter target if possible)
 +
|-
 +
|15
 +
|Hunt
 +
|scan for and attack enemies wherever they may be on the map
 +
|-
 +
|16
 +
|Unload
 +
|while dropping off cargo (e.g. Landing Craft unloading passengers)
 +
|-
 +
|17
 +
|Sabotage
 +
|unit runs to place C4 on a building or Ivan goes to place bomb on object
 +
|-
 +
|18
 +
|Construction
 +
|structures use this when building up after initial placement
 +
|-
 +
|19
 +
|Selling
 +
|structures use this for deconstruction after being sold
 +
|-
 +
|20
 +
|Repair
 +
|used when repairing an object (e.g. Service Depot)
 +
|-
 +
|21
 +
|Rescue
 +
|special team over-ride mission
 +
|-
 +
|22
 +
|Missile
 +
|#{{fnl|1}}uke Silo special launch missile mission
 +
|-
 +
|23
 +
|Harmless
 +
|object doesn't fire and is not considered in any threat scan
 +
|-
 +
|24
 +
|Open
 +
|while opening or closing a gate to allow passage
 +
|-
 +
|25
 +
|Patrol
 +
|patrol a series of waypoints
 +
|-
 +
|26
 +
|Paradrop Approach
 +
|object is approaching the paradrop site
 +
|-
 +
|27
 +
|Paradrop Overfly
 +
|object is flying over the paradrop site (i.e. dropping the paratroopers)
 +
|-
 +
|28
 +
|Wait
 +
|paused and awaiting next mission
 +
|-
 +
|29
 +
|Move
 +
|(special duplicate) used when Chrono units are moving to destination
 +
|-
 +
|30
 +
|Attack
 +
|(special duplicate) used when units are deployed to fire (e.g. weapons with an area fire effect)
 +
|-
 +
!colspan="3"|{{Yr}} additions
 +
|-
 +
|31
 +
|Spyplane Approach
 +
|object is flying towards target
 +
|-
 +
|32
 +
|Spyplane Overfly
 +
|object is flying over the target
 +
|}
 +
|-
 +
|12
 +
|Global Variable#{{fnl|1}}
 +
|'''Set Global Variable'''
 +
The [[VariableNames|global variable]] number specified in the second parameter is defined as being 'set' (it is allocated a value of '1' or 'true'). This should be employed in specific map files only. This is part of the boolean logic employed by the global variables system in the game engine.
 +
|-
 +
|13
 +
|Sequence#{{fnl|1}}
 +
|'''Play Idle Anim Sequence'''
 +
If the TaskForce contains a unit or units that use SHP graphics (i.e. infantry) then the relevant idle SHP sequence is displayed as defined by the frame numbering system in ART.INI.
 +
|-
 +
|14
 +
|0
 +
|'''Load Onto Transport'''
 
If the TaskForce contains a unit or units that have a valid {{f|Passengers||link}} value set, and units whose {{f|Size||link}} and {{f|PhysicalSize||link}} settings allow them to be carried by that transport, this command will make the units enter the transport.
 
If the TaskForce contains a unit or units that have a valid {{f|Passengers||link}} value set, and units whose {{f|Size||link}} and {{f|PhysicalSize||link}} settings allow them to be carried by that transport, this command will make the units enter the transport.
+
|-
15,n = Spy On Structure At Waypoint, n = waypoint number
+
|15
 
+
|Waypoint#{{fnl|1}}
 +
|'''Spy On Structure At Waypoint'''
 
Should be used only for units with {{f|Infiltrate|yes|link}} and {{f|Agent|yes|link}} set. This instructs the TaskForce to enter the structure at the waypoint number specified by the second parameter and spy on the structure if it has {{f|Spyable|yes|link}} set. If there is no building at the specified waypoint, the TaskForce may not activate correctly and will just remain in their last mission. Refer [[Waypoints]] for details on waypoint.
 
Should be used only for units with {{f|Infiltrate|yes|link}} and {{f|Agent|yes|link}} set. This instructs the TaskForce to enter the structure at the waypoint number specified by the second parameter and spy on the structure if it has {{f|Spyable|yes|link}} set. If there is no building at the specified waypoint, the TaskForce may not activate correctly and will just remain in their last mission. Refer [[Waypoints]] for details on waypoint.
+
|-
16,n = Patrol to waypoint, n = waypoint number
+
|16
 
+
|Waypoint#{{fnl|1}}
 +
|'''Patrol to waypoint'''
 
This is similar to Move to waypoint. This instructs the TeamType to use the TaskForce to move to the waypoint number specified by the second parameter. The difference is that the units in the TaskForce will move out of their patrol route to actively go and engage any enemy objects that are within their {{f|Sight||link}} as they move to the waypoint. NOTE: this action eats up processor time, because the TaskForce will scan for enemy objects with each movement. If you have a lot of TaskForces (or lots of units in them) engaged in this action, you will experience slowdown in the game - this is one reason why the single player missions are comparatively slow, they use this action a lot. The rate at which the scanning for targets whilst in this mission is controlled by the {{f|PatrolScan||link}} statement in the [AI]section of RULES.INI. Refer [[Waypoints]] for details on waypoint.
 
This is similar to Move to waypoint. This instructs the TeamType to use the TaskForce to move to the waypoint number specified by the second parameter. The difference is that the units in the TaskForce will move out of their patrol route to actively go and engage any enemy objects that are within their {{f|Sight||link}} as they move to the waypoint. NOTE: this action eats up processor time, because the TaskForce will scan for enemy objects with each movement. If you have a lot of TaskForces (or lots of units in them) engaged in this action, you will experience slowdown in the game - this is one reason why the single player missions are comparatively slow, they use this action a lot. The rate at which the scanning for targets whilst in this mission is controlled by the {{f|PatrolScan||link}} statement in the [AI]section of RULES.INI. Refer [[Waypoints]] for details on waypoint.
+
|-
17,n = Change Script, n = script number to execute
+
|17
 
+
|Script#{{fnl|1}}
Very handy and under utilized - this instructs the TaskForce to execute another ScriptType. The second parameter specifies the number of the ScriptType to execute as listed in the [ScriptTypes]table (consider the table as being numbered starting at 0 for this purpose).
+
|'''Change Script'''
+
Very handy and under utilized - this instructs the TaskForce to execute another ScriptType. The second parameter specifies the number of the ScriptType to execute as listed in the [ScriptTypes] table (consider the table as being numbered starting at 0 for this purpose).
18,n = Change Team, n = team number to join
+
|-
 
+
|18
This instructs the TaskForce to join another TeamType. The second parameter specifies the number of the TeamType to join as listed in the [TeamTypes]table (consider the table as being numbered starting at 0 for this purpose).
+
|Team#{{fnl|1}}
+
|'''Change Team'''
19,0 = Panic
+
This instructs the TaskForce to join another TeamType. The second parameter specifies the number of the TeamType to join as listed in the [TeamTypes] table (consider the table as being numbered starting at 0 for this purpose).
 
+
|-
 +
|19
 +
|0
 +
|'''Panic'''
 
If the TaskForce contains a unit or units that have {{f|Fraidycat|yes|link}} set then they will run around aimlessly, using the {{f|Panic}} animation from their sequence as defined in ART.INI. Normally used for the civilian units. Units that do not fulfil this criteria lie down and act as if prone.
 
If the TaskForce contains a unit or units that have {{f|Fraidycat|yes|link}} set then they will run around aimlessly, using the {{f|Panic}} animation from their sequence as defined in ART.INI. Normally used for the civilian units. Units that do not fulfil this criteria lie down and act as if prone.
+
|-
20,n = Change House Ownership, n = house number of new owner
+
|20
 
+
|House#{{fnl|1}}
 +
|'''Change House Ownership'''
 
Used in single player missions on specific map files only, this changes ownership of the entire TeamType to the house number specified by the second parameter.
 
Used in single player missions on specific map files only, this changes ownership of the entire TeamType to the house number specified by the second parameter.
+
|-
21,0 = Scatter
+
|21
 
+
|0
This instructs the TaskForce to scatter (same effect as selecting a group of units and pressing the Scatter key as defined in KEYBOARD.INI).
+
|'''Scatter'''
+
This instructs the TaskForce to scatter (same effect as selecting a group of units and pressing the Scatter key as defined in [[Keyboard.ini|KEYBOARD.INI]]).
22,0 = Afraid & Run To Shroud
+
|-
 
+
|22
 +
|0
 +
|'''Afraid & Run To Shroud'''
 
This instructs the TaskForce to behave in a scared manner and it will run to the nearest shrouded cell. The TaskForce will not actively engage in combat, will not acquire targets and will not retaliate (it will scatter instead if attacked).
 
This instructs the TaskForce to behave in a scared manner and it will run to the nearest shrouded cell. The TaskForce will not actively engage in combat, will not acquire targets and will not retaliate (it will scatter instead if attacked).
+
|-
23,0 = Force Player Loss
+
|23
 
+
|0
 +
|'''Force Player Loss'''
 
Forces a game loss condition for the owner of the TeamType (they lose the game).
 
Forces a game loss condition for the owner of the TeamType (they lose the game).
+
|-
24,n = Play Speech From EVA.INI, n = number of speech to play
+
|24
 
+
|Speech#{{fnl|1}}
This instructs the TaskForce to play one of the Sofia or EVA voices (depending upon the {{f|ParentCountry||link}} or the owner of this TaskForce). The second parameter is the number of the sound to be played from the [DialogList] in the EVA.INI file (note that you should consider this list as being numbered from 0 instead of 1 to get the correct numbering convention).
+
|'''Play Speech'''
+
This instructs the TaskForce to play one of the Sofia or EVA voices (depending upon the {{f|ParentCountry||link}} or the owner of this TaskForce). The second parameter is the number of the sound to be played from the [DialogList] in the [[Eva.ini|EVA.INI]] (note that you should consider this list as being numbered from 0 instead of 1 to get the correct numbering convention).
25,n = Play Sound From SOUND.INI, n = number of sound to play
+
|-
 
+
|25
This instructs the TaskForce to play one of the generic in game sounds from the [SoundList] in the SOUND.INI file (note that for all in game Action and Trigger purposes this number is from an internal table.
+
|Sound#{{fnl|1}}
+
|'''Play Sound'''
26,n = Play Movie
+
This instructs the TaskForce to play one of the generic in game sounds from the [SoundList] in the [[Sounds.ini|SOUNDS.INI]] file (note that for all in game Action and Trigger purposes this number is from an internal table.
 
+
|-
This instructs the TaskForce to play one of the movies from the [Movies] list in the ART.INI file (note that for all in game Action and Trigger purposes this number is from an internal table.
+
|26
+
|Movie#{{fnl|1}}
27,n = Play Theme From THEME.INI, n = number of theme to play
+
|'''Play Movie'''
 
+
This instructs the TaskForce to play one of the movies from the [Movies] list in the [[Art.ini|ART.INI]] file (note that for all in game Action and Trigger purposes this number is from an internal table.
This instructs the TaskForce to play one of the game soundtracks from the [Themes] list in the THEME.INI file (note that for all in game Action and Trigger purposes this number is from an internal table.
+
|-
+
|27
28,0 = Reduce Ore
+
|Theme#{{fnl|1}}
 
+
|'''Play Theme'''
 +
This instructs the TaskForce to play one of the game soundtracks from the [Themes] list in the [[Theme.ini|Theme.INI]] file (note that for all in game Action and Trigger purposes this number is from an internal table.
 +
|-
 +
|28
 +
|0
 +
|'''Reduce Ore'''
 
Reduces the amount of Ore in the cell that the TeamType is occupying. Used by the special 'weapon' that is inherent with Ore Miners.
 
Reduces the amount of Ore in the cell that the TeamType is occupying. Used by the special 'weapon' that is inherent with Ore Miners.
+
|-
29,0 = Begin Production
+
|29
 
+
|0
 +
|'''Begin Production'''
 
Forces the owner of the TeamType to begin the auto-production process (the AI's behaviour in skirmish games). Should only be used on AI controlled houses.
 
Forces the owner of the TeamType to begin the auto-production process (the AI's behaviour in skirmish games). Should only be used on AI controlled houses.
+
|-
30,0 = Force Sale
+
|30
 
+
|0
 +
|'''Force Sale'''
 
Forces the 'fire sale' of all remaining structures owned by the {{f|House}}= to which the TeamType belongs.
 
Forces the 'fire sale' of all remaining structures owned by the {{f|House}}= to which the TeamType belongs.
+
|-
31,0 = Suicide
+
|31
 
+
|0
 +
|'''Suicide'''
 
This instructs the TaskForce to destroy itself. In effect it commits suicide, usually accompanied by an explosion.
 
This instructs the TaskForce to destroy itself. In effect it commits suicide, usually accompanied by an explosion.
+
|-
32,n = Start Weather Storm In... (Ion Storm in TS)
+
|32
 
+
|Time#{{fnl|1}}
This initiates the Weather Storm intro effect (when the screen goes dark prior to the clouds appearing) and is set to be delayed by the number of seconds specified by parameter 2.
+
|'''Start Storm In...'''
+
Initiates an Ion Storm (TS) or Weather Storm (RA2) after the time specified. In {{Ra2}}, this initiates the Weather Storm intro effect (when the screen goes dark prior to the clouds appearing). The effect is set to be delayed by the number of seconds specified by parameter 2.
33,0 = End Weather Storm (Ion Storm in TS)
+
|-
 
+
|33
This forces an end to the Weather Storm intro effect (when the screen goes dark prior to the clouds appearing).
+
|0
+
|'''End Storm'''
34,n = Center Map On Team
+
This forces an end to the active Ion Storm or Weather Storm.
 
+
|-
This will center the screen on the TeamType. The same effect as hitting the Home key as defined in KEYBOARD.INI when the screen centers on your MCV (or the unit defined by the {{f|BaseUnit||link}} statement in RULES.INI). The second parameter determines the speed at which the 'camera' switches view to the TaskForce with 0 being instant.
+
|34
+
|Team#{{fnl|1}}
35,n = Shroud Map For Time Interval, n = time to remain shrouded
+
|'''Center Map On Team'''
 
+
This will center the screen on the TeamType. The same effect as hitting the Home key as defined in [[Keyboard.ini|KEYBOARD.INI]] when the screen centers on your MCV (or the unit defined by the {{f|BaseUnit||link}} statement in RULES.INI). The second parameter determines the speed at which the 'camera' switches view to the TaskForce with 0 being instant.
This action will shroud the entire map except for the area around the players MCV's (if they have one). The second parameter determines the number of frames for which the map should remain shrouded (1 second = approximately 15 frames) after which the explored areas are revealed again.
+
|-
+
|35
36,n = Reveal Map For Time Interval, n = time to remain revealed
+
|Time#{{fnl|1}}
 
+
|'''Shroud Map For Time Interval'''
This action will reveal the entire map. The second parameter determines the number of frames for which the map should remain revealed (1 second = approximately 15 frames) after which the map is shrouded again.
+
This action will shroud the entire map except for the area revealed by the player's own and/or friendly units. The second parameter determines the number of [[frames]] for which the map should remain shrouded after which the explored areas are revealed again.
+
|-
37,0 = Delete Team Members
+
|36
 
+
|Time#{{fnl|1}}
 +
|'''Reveal Map For Time Interval'''
 +
This action will reveal the entire map. The second parameter determines the number of [[frames]] for which the map should remain revealed after which the map is shrouded again.
 +
|-
 +
|37
 +
|0
 +
|'''Delete Team Members'''
 
This forces dissolved members of the TaskForce to leave the map after which they are deleted (for example aerial transports after their passengers have disembarked).
 
This forces dissolved members of the TaskForce to leave the map after which they are deleted (for example aerial transports after their passengers have disembarked).
+
|-
38,n = Clear Global, n = Global number to be cleared
+
|38
 
+
|Global Variable#{{fnl|1}}
The global number specified in the second parameter is defined as being 'clear' (it is allocated a value of '0' or 'false'). This should be employed in specific map files only in which the global variable has been defined. This is part of the boolean logic employed by the global variables system in the game engine.
+
|'''Clear Global Variable'''
+
The [[VariableNames|global variable]] number specified in the second parameter is defined as being 'clear' (it is allocated a value of '0' or 'false'). This should be employed in specific map files only in which the global variable has been defined. This is part of the boolean logic employed by the global variables system in the game engine.
39,n = Set Local, n = Local number to be set
+
|-
 
+
|39
The local variable number specified in the second parameter is defined as being 'set' (it is allocated a value of '1' or 'true'). This should be employed in specific map files only in which the local variable has been defined. This is part of the boolean logic employed by the local variables system in the game engine.
+
|Local Variable#{{fnl|1}}
+
|'''Set Local Variable'''
40,n = Clear Local, n = Local number to be cleared
+
The [[VariableNames|local variable]] number specified in the second parameter is defined as being 'set' (it is allocated a value of '1' or 'true'). This should be employed in specific map files only in which the local variable has been defined. This is part of the boolean logic employed by the local variables system in the game engine.
 
+
|-
The local variable number specified in the second parameter is defined as being 'cleared' (it is allocated a value of '0' or 'false'). This should be employed in specific map files only in which the local variable has been defined. This is part of the boolean logic employed by the local variables system in the game engine.
+
|40
+
|Local Variable#{{fnl|1}}
41,n = Unpanic
+
|'''Clear Local Variable'''
 
+
The [[VariableNames|local variable]] number specified in the second parameter is defined as being 'cleared' (it is allocated a value of '0' or 'false'). This should be employed in specific map files only in which the local variable has been defined. This is part of the boolean logic employed by the local variables system in the game engine.
 +
|-
 +
|41
 +
|0
 +
|'''Unpanic'''
 
If the TaskForce contains a unit or units that have {{f|Fraidycat|yes|link}} set which are currently assigned the {{f|Panic}}= sequence then this action nullifies that effect and the unit(s) adopt their default behaviour.
 
If the TaskForce contains a unit or units that have {{f|Fraidycat|yes|link}} set which are currently assigned the {{f|Panic}}= sequence then this action nullifies that effect and the unit(s) adopt their default behaviour.
+
|-
42,n = Change Facing, n = new direction to face
+
|42
 
+
|Direction#{{fnl|1}}
 +
|'''Change Facing'''
 
This instructs the TaskForce to turn and face the new direction specified by the second parameter. The facings are as follows:
 
This instructs the TaskForce to turn and face the new direction specified by the second parameter. The facings are as follows:
 
+
{|class="wikitable"
0         North
+
!Value
1         North East
+
!Direction
2         East
+
|-
3         South East
+
|0
4         South
+
|North-East
5         South West
+
|-
6         West
+
|1
7         North West
+
|East
 
+
|-
43,0 = Wait Until Fully Loaded
+
|2
 
+
|South-East
 +
|-
 +
|3
 +
|South
 +
|-
 +
|4
 +
|South-West
 +
|-
 +
|5
 +
|West
 +
|-
 +
|6
 +
|North-West
 +
|-
 +
|7
 +
|North
 +
|}
 +
|-
 +
|43
 +
|0
 +
|'''Wait Until Fully Loaded'''
 
This is always used after members of the TaskForce have entered a transport in the same TaskForce and serves two purposes. The effect of this is that the transport will be used to carry out any subsequent movement or deploy actions but after that it is no longer considered a part of this TaskForce and as such is available to be recruited into new TeamTypes. It is this action which enables use of the {{f|TransportsReturnOnUnload|yes|link}} statement in the corresponding TeamType entry. The second purpose is to flag the transport as being 'loaded' with passengers and thus is considered in the AI's targeting logic as a potential threat (see the {{f|ContentScan||link}} entry in the RULES.INI). This action also orders the transport to wait until it is fully loaded before executing any subsequent script actions.
 
This is always used after members of the TaskForce have entered a transport in the same TaskForce and serves two purposes. The effect of this is that the transport will be used to carry out any subsequent movement or deploy actions but after that it is no longer considered a part of this TaskForce and as such is available to be recruited into new TeamTypes. It is this action which enables use of the {{f|TransportsReturnOnUnload|yes|link}} statement in the corresponding TeamType entry. The second purpose is to flag the transport as being 'loaded' with passengers and thus is considered in the AI's targeting logic as a potential threat (see the {{f|ContentScan||link}} entry in the RULES.INI). This action also orders the transport to wait until it is fully loaded before executing any subsequent script actions.
+
|-
44,0 = Unload TRUCKB > TRUCKA
+
|44
 
+
|0
Used purely for a graphical effect and applicable uniquely to the [TRUCKB] unit, this has the effect of converting [TRUCKB] into [TRUCKA] to give the impression that the unit has unloaded its cargo. NOTE: this is residual from Tiberian Sun and as such may not work correctly since [TRUCKA] refers to the Demo Truck image in Red Alert 2 which has no 'unloaded' image. Changing the image for the Demo Truck and assigning new units to [TRUCKA] and [TRUCKB] enables use of this logic.
+
|'''Unload Truck (TRUCKB to TRUCKA)'''
+
Used purely for a graphical effect and applicable uniquely to the [TRUCKB] unit, this has the effect of converting [TRUCKB] into [TRUCKA] to give the impression that the unit has unloaded its cargo.
45,0 = Load TRUCKA > TRUCKB
+
'''Note''': May not work correctly in Red Alert 2 since [TRUCKA] refers to the Demo Truck image which has no 'unloaded' image. Changing the image for the Demo Truck and assigning new units to [TRUCKA] and [TRUCKB] enables use of this logic.
 
+
|-
Used purely for a graphical effect and applicable uniquely to the [TRUCKA] unit, this has the effect of converting [TRUCKA] into [TRUCKB]to give the impression that the unit has been loaded with cargo. NOTE: this is residual from Tiberian Sun and as such may not work correctly since [TRUCKA] refers to the Demo Truck image in Red Alert 2 which has no 'unloaded' image. Changing the image for the Demo Truck and assigning new units to [TRUCKA] and [TRUCKB] enables use of this logic.
+
|45
+
|0
46,n = Attack Enemy Structure, n = structure number (see note below)
+
|'''Load Truck (TRUCKA to TRUCKB)'''
 
+
Used purely for a graphical effect and applicable uniquely to the [TRUCKA] unit, this has the effect of converting [TRUCKA] into [TRUCKB] to give the impression that the unit has been loaded with cargo.
 +
'''Note''': May not work correctly in Red Alert 2 since [TRUCKA] refers to the Demo Truck image which has no 'unloaded' image. Changing the image for the Demo Truck and assigning new units to [TRUCKA] and [TRUCKB] enables use of this logic.
 +
|-
 +
|46
 +
|Structure#{{fnl|1}} {{fnl|3}}
 +
|'''Attack Enemy Structure'''
 
Members of this TaskForce attack the enemy structure specified by the second parameter. This action depends upon the type of units in the TaskForce and if certain members have {{f|Infiltrate|yes|link}} set. Members with {{f|Engineer|yes|link}} set will capture the structure provided it does not have {{f|Capturable|no|link}} set or if it has {{f|NeedsEngineer|yes|link}} set. Members with {{f|Agent|yes|link}} set will spy on the structure if it has {{f|Spyable|yes|link}} set. Members that do not have {{f|Assaulter|no|link}} set will garrison the structure if it has {{f|CanBeOccupied|yes|link}} set. Members with {{f|C4|yes|link}} set will blow up the structure if does not have {{f|CanC4|no|link}} set.
 
Members of this TaskForce attack the enemy structure specified by the second parameter. This action depends upon the type of units in the TaskForce and if certain members have {{f|Infiltrate|yes|link}} set. Members with {{f|Engineer|yes|link}} set will capture the structure provided it does not have {{f|Capturable|no|link}} set or if it has {{f|NeedsEngineer|yes|link}} set. Members with {{f|Agent|yes|link}} set will spy on the structure if it has {{f|Spyable|yes|link}} set. Members that do not have {{f|Assaulter|no|link}} set will garrison the structure if it has {{f|CanBeOccupied|yes|link}} set. Members with {{f|C4|yes|link}} set will blow up the structure if does not have {{f|CanC4|no|link}} set.
+
|-
47,n = Move To Enemy Structure, n = structure number (see note below)
+
|47
 
+
|Structure#{{fnl|1}} {{fnl|3}}
 +
|'''Move To Enemy Structure'''
 
Members of this TaskForce move and stay adjacent to the enemy structure specified by the second parameter.
 
Members of this TaskForce move and stay adjacent to the enemy structure specified by the second parameter.
+
|-
48,0 = Scout
+
|48
 
+
|0
 +
|'''Scout'''
 
Causes members of this TaskForce to move to a pre-determined point on the map in an attempt to scout an area. The effect is that the TaskForce will move in one randomly chosen direction until it is no longer able to do so which can make it very useful or a waste of time depending on the direction chosen. If you want to continually scout the map, you should loop this script action.
 
Causes members of this TaskForce to move to a pre-determined point on the map in an attempt to scout an area. The effect is that the TaskForce will move in one randomly chosen direction until it is no longer able to do so which can make it very useful or a waste of time depending on the direction chosen. If you want to continually scout the map, you should loop this script action.
+
|-
49,0 = Register success for AITrigger weight adjustment.
+
|49
 
+
|0
Executing this script action even once in a script by its task force is considered as a success. A script not containing this script action is a fail for its task force. A script containing this script action but the task force being unable to reach and execute this script action even once is a fail. These success and failure are used to adjust the current weight defined in AITriggers. Refer [[AITriggerTypes#Weights|AITriggerType's weights]].
+
|'''Register success for AITrigger weight adjustment.'''
+
Executing this script action even once in a script by its task force is considered as a success. A script not containing this script action is a fail for its task force. A script containing this script action but the task force being unable to reach and execute this script action even once is a fail. These success and failure are used to adjust the current weight defined in AITriggers. Refer [[AITriggerTypes#{{fnl|1}}Weights|AITriggerType's weights]].
50,n = Flash (visual effect), n = number of flashes
+
|-
 
+
|50
 +
|Flash#{{fnl|1}}
 +
|'''Flash (visual effect)'''
 
This causes the TaskForce to 'flash', the visual effect you get on an object when you order something to attack it. The second parameter is the number of times to flash the unit 'white'.
 
This causes the TaskForce to 'flash', the visual effect you get on an object when you order something to attack it. The second parameter is the number of times to flash the unit 'white'.
+
|-
51,n= Play Animation, n = animation number
+
|51
 
+
|Animation#{{fnl|1}}
 +
|#{{fnl|1}}= Play Animation'''
 
This instructs the TaskForce to play one of the animations from the [Animations] in the RULES.INI.INI file (note that for all in game Action and Trigger purposes this number is from an internal table).
 
This instructs the TaskForce to play one of the animations from the [Animations] in the RULES.INI.INI file (note that for all in game Action and Trigger purposes this number is from an internal table).
+
|-
52,n = Display Talk Bubble, n = talk bubble number
+
!colspan="3"|{{fs}} addition
 
+
|-
Should be used for single-unit TaskForces only, this causes a 'talk bubble' to appear above the unit. The second parameter determines which type of talk bubble to display:
+
|52
 
+
|Talk Bubble#{{fnl|1}}
1         *           general speech
+
|'''Display Talk Bubble'''
2         ?           question
+
Should be used for single-unit TaskForces only, this causes a 'talk bubble' to appear above the unit. The second parameter determines which type of talk bubble to display. By default, the game has only three talk bubbles, though it's possible to add more and change what the bubbles represent:
3          !          shouting or statement
+
{|class="wikitable"
 
+
!Value
Note that the length of time for which the talk bubble is displayed is controlled through the {{f|TalkBubbleTime||link}} statement in RULES.INI - refer to the RULES.INI Guide for details of this and the steps to take to enable its inclusion in Red Alert 2 as this remains residual from Tiberian Sun:Firestorm.
+
!Bubble
+
|-
53,0 = Gather (at enemy base) (not in TS)
+
|1
 +
|* (generic speech)
 +
|-
 +
|2
 +
|? (question, confusion)
 +
|-
 +
|3
 +
|! (alert, attention, shout)
 +
|}
  
 +
'''Note''': The length of time for which the talk bubble is displayed is controlled through the {{f|TalkBubbleTime||link}} statement in RULES.INI. Refer to the RULES.INI Guide for details of this and the steps to take to enable its inclusion in Red Alert 2.
 +
|-
 +
!colspan="3"|{{Ra2}} additions
 +
|-
 +
|53
 +
|0
 +
|'''Gather (at enemy base)'''
 
This causes the TaskForce to gather together (sometimes used when members of the TaskForce move at different speeds and you want the faster ones to stop while the slower ones catch up) after the previous action has been executed. If the TaskForce is in an attack mission and moving towards an enemy base, this command is usually executed when the first member of the TaskForce reaches the distance from that base defined by the {{f|AISafeDistance||link}} statement in RULES.INI.
 
This causes the TaskForce to gather together (sometimes used when members of the TaskForce move at different speeds and you want the faster ones to stop while the slower ones catch up) after the previous action has been executed. If the TaskForce is in an attack mission and moving towards an enemy base, this command is usually executed when the first member of the TaskForce reaches the distance from that base defined by the {{f|AISafeDistance||link}} statement in RULES.INI.
+
|-
54,0 = Regroup (at friendly base) (not in TS)
+
|54
 
+
|0
 +
|'''Regroup (at friendly base)'''
 
This causes the TaskForce to regroup, if for example any of its members have become engaged in a base defense mission or strayed away whilst in guard mode, or even the TeamType itself has been suspended for whatever reason. The members regroup directly next to each other leaving no 'gaps' at the nearest available point with sufficient space, and is used, for example, prior to activating the Iron Curtain so that all applicable members are affected (i.e. they fall within its range of effect).
 
This causes the TaskForce to regroup, if for example any of its members have become engaged in a base defense mission or strayed away whilst in guard mode, or even the TeamType itself has been suspended for whatever reason. The members regroup directly next to each other leaving no 'gaps' at the nearest available point with sufficient space, and is used, for example, prior to activating the Iron Curtain so that all applicable members are affected (i.e. they fall within its range of effect).
+
|-
55,0 = Activate Iron Curtain on TaskForce (not in TS)
+
|55
 
+
|0
 +
|'''Activate Iron Curtain on TaskForce'''
 
If the owner of the TaskForce to which this ScriptType is attached also has the Iron Curtain fully charged then it will be fired at this TaskForce. Note that the use of the Iron Curtain in this manner depends on the percentage chance of the AI incorporating them into its actions as defined by the {{f|AIMinorSuperReadyPercent||link}} statement in RULES.INI.
 
If the owner of the TaskForce to which this ScriptType is attached also has the Iron Curtain fully charged then it will be fired at this TaskForce. Note that the use of the Iron Curtain in this manner depends on the percentage chance of the AI incorporating them into its actions as defined by the {{f|AIMinorSuperReadyPercent||link}} statement in RULES.INI.
+
|-
56,n = ChronoSphere TaskForce, n = structure number to be Chronoshifted to (see note below) (not in TS)
+
|56
 
+
|Structure#{{fnl|1}} {{fnl|3}}
 +
|'''ChronoSphere TaskForce'''
 
If the owner of the TaskForce to which this ScriptType is attached also has the Chronosphere fully charged then it will be used on the TaskForce before moving on to the next action. Note that the use of the Chronosphere in this manner depends on the percentage chance of the AI incorporating them into its actions as defined by the {{f|AIMinorSuperReadyPercent||link}} statement in RULES.INI.
 
If the owner of the TaskForce to which this ScriptType is attached also has the Chronosphere fully charged then it will be used on the TaskForce before moving on to the next action. Note that the use of the Chronosphere in this manner depends on the percentage chance of the AI incorporating them into its actions as defined by the {{f|AIMinorSuperReadyPercent||link}} statement in RULES.INI.
+
|-
57,n = ChronoWarp TaskForce, n = target number to be Chronoshifted to (see note below) (not in TS)
+
|57
 
+
|Structure#{{fnl|1}} {{fnl|3}}
 +
|'''ChronoWarp TaskForce'''
 
If the owner of the TaskForce to which this ScriptType is attached has been Chronosphered then it will be used on the same TaskForce to shift them to the enemy structure number specified in the second parameter before moving on to the next action. Note that the use of the Chronosphere in this manner depends on the percentage chance of the AI incorporating them into its actions as defined by the {{f|AIMinorSuperReadyPercent||link}} statement in RULES.INI.
 
If the owner of the TaskForce to which this ScriptType is attached has been Chronosphered then it will be used on the same TaskForce to shift them to the enemy structure number specified in the second parameter before moving on to the next action. Note that the use of the Chronosphere in this manner depends on the percentage chance of the AI incorporating them into its actions as defined by the {{f|AIMinorSuperReadyPercent||link}} statement in RULES.INI.
+
|-
58,n = Move To Friendly Structure, n = structure number (see note below) (not in TS)
+
|58
 
+
|Structure#{{fnl|1}} {{fnl|3}}
 +
|'''Move To Friendly Structure'''
 
Members of this TaskForce move and stay adjacent to the friendly structure specified by the second parameter. The structure can be one owned by the owner of the TaskForce or any of its allies.
 
Members of this TaskForce move and stay adjacent to the friendly structure specified by the second parameter. The structure can be one owned by the owner of the TaskForce or any of its allies.
+
|-
59,n = Attack Structure At Waypoint (YR only, not in TS/RA2)
+
|colspan="3"|{{Yr}} additions
 
+
|-
 +
|59
 +
|Waypoint#{{fnl|1}}
 +
|'''Attack Structure At Waypoint'''
 
Members of this TaskForce attack the structure at the waypoint specified by the second parameter. This action is very similar to action number 43 although this action does not test for ownership of the structure itself - thus the inclusion of this action allows, for example, InfantryTypes with {{f|Engineer|yes|link}} set to enter structures owned by the same side for the purposes of repair. This would be the most appropriate action to use to get the AI to repair bridges. Use of this also means that the TaskForce will attack the structure with one of its weapons meaning, for example, that units with {{f|C4|yes|link}} set will not C4 the building but shoot at it instead. This is useful if you want to get a TaskForce to destroy a nearby occupiable structure instead of entering it in a bid to prevent the enemy getting hold of it - a tactic used in the Yuri's Revenge AI.
 
Members of this TaskForce attack the structure at the waypoint specified by the second parameter. This action is very similar to action number 43 although this action does not test for ownership of the structure itself - thus the inclusion of this action allows, for example, InfantryTypes with {{f|Engineer|yes|link}} set to enter structures owned by the same side for the purposes of repair. This would be the most appropriate action to use to get the AI to repair bridges. Use of this also means that the TaskForce will attack the structure with one of its weapons meaning, for example, that units with {{f|C4|yes|link}} set will not C4 the building but shoot at it instead. This is useful if you want to get a TaskForce to destroy a nearby occupiable structure instead of entering it in a bid to prevent the enemy getting hold of it - a tactic used in the Yuri's Revenge AI.
+
|-
60,0 = Enter Grinder (YR only, not in TS/RA2)
+
|60
 
+
|0
 +
|'''Enter Grinder'''
 
Members of this TaskForce will enter the nearest structure with {{f|Grinding|yes|link}} set if it is owned by the owner of the TaskForce or any of its allies.
 
Members of this TaskForce will enter the nearest structure with {{f|Grinding|yes|link}} set if it is owned by the owner of the TaskForce or any of its allies.
+
|-
61,0 = Occupy Tank Bunker (YR only, not in TS/RA2)
+
|61
 
+
|0
 +
|'''Occupy Tank Bunker'''
 
Any VehicleType members of this TaskForce which do not have {{f|Bunkerable|no|link}} set will enter the nearest vacant structure with {{f|Bunker|yes|link}} set if it is owned by the owner of the TaskForce or any of its allies.
 
Any VehicleType members of this TaskForce which do not have {{f|Bunkerable|no|link}} set will enter the nearest vacant structure with {{f|Bunker|yes|link}} set if it is owned by the owner of the TaskForce or any of its allies.
+
|-
62,0 = Enter Bio Reactor (YR only, not in TS/RA2)
+
|62
 
+
|0
 +
|'''Enter Bio Reactor'''
 
Any InfantryType members of this TaskForce will enter the nearest structure with {{f|InfantryAbsorb|yes|link}} set if it is owned by the owner of the TaskForce or any of its allies and has space available.
 
Any InfantryType members of this TaskForce will enter the nearest structure with {{f|InfantryAbsorb|yes|link}} set if it is owned by the owner of the TaskForce or any of its allies and has space available.
+
|-
63,0 = Occupy Battle Bunker (YR only, not in TS/RA2)
+
|63
 
+
|0
 +
|'''Occupy Battle Bunker'''
 
Any InfantryType members of this TaskForce with {{f|Occupier|yes|link}} set will enter the nearest structure (which they own) with {{f|CanOccupyFire|yes|link}} set.
 
Any InfantryType members of this TaskForce with {{f|Occupier|yes|link}} set will enter the nearest structure (which they own) with {{f|CanOccupyFire|yes|link}} set.
+
|-
64,0 = Garrison Structure (YR only, not in TS/RA2)
+
|64
 
+
|0
Any InfantryType members of this TaskForce with {{f|Occupier|yes|link}} set will enter the nearest (neutral) structure with {{f|CanOccupyFire|yes|link}} set. This action is used specifically for this purpose due to action #59 (see above) since the logic in Yuri's Revenge has changed so that the units weapon is transferred to the structure. Use of this action also allows the computer to repair those structures by sending an InfantryType with {{f|Engineer|yes|link}} set into them and also allows the AI to differentiate between attacking such a structure and entering it, which is useful if you want the AI to use infantry to destroy an occupiable structure thus preventing its enemy from using it.
+
|'''Garrison Structure'''
 
+
Any InfantryType members of this TaskForce with {{f|Occupier|yes|link}} set will enter the nearest (neutral) structure with {{f|CanOccupyFire|yes|link}} set. This action is used specifically for this purpose due to action #{{fnl|1}}59 (see above) since the logic in Yuri's Revenge has changed so that the units weapon is transferred to the structure. Use of this action also allows the computer to repair those structures by sending an InfantryType with {{f|Engineer|yes|link}} set into them and also allows the AI to differentiate between attacking such a structure and entering it, which is useful if you want the AI to use infantry to destroy an occupiable structure thus preventing its enemy from using it.
 
+
|}
'''Note on Structure number'''
 
 
 
Structure number allows the AI to target a specific instance of a building. For example, if there are 5 instances of a power plant in enemy base, AI can choose one of them as target depending on its distance or threat value. By itself several instances of the same building doesn't have different threat value, but threat is cumulative. For example, if there are some units nearby a specific building, its threat rating becomes higher with the additional threat values of the nearby units.
 
 
 
Building index used in computation is the position of that building in the [BuildingTypes] list, counting from 0.
 
 
 
Logic for target selection:
 
<pre>0 + index = select building with least threat
 
65536 + index = select building with highest threat
 
131072 + index = select nearest building
 
196608 + index = select farthest building</pre>
 
 
 
Reference to 262144 or higher number makes it a do nothing script action and the next action in the script, if it exists is executed.
 
 
 
In cases where there is only one instance of a specific building then all the four options would result in selecting the same target.
 
  
In cases where multiple instances of the building have equal threat, AI will choose the one which was constructed first by the target side. If the first was destroyed/sold etc., then next constructed building becomes target. Friendlies doesn't pose threat, so it becomes a case of equal threat.
+
{{fn|1|For convenience, the "#" symbol refers to a number/index of the object type. For example, "Waypoint#" refers to the index number of the Waypoint in the [[Waypoints]] list}}
 +
{{fn|2|Time to guard area in tenths of a minute (multiples of 6 seconds) at normal game speed.}}
 +
{{fn|3|Refers to the structure index in [[BuildingTypes]] combined with a unique target scan determinant. See the [[ScriptTypes/ScriptActions#Notes|Notes]] section for more information}}
  
Even though the script is specified for a team/task force, every unit in the team executes it individually. This may result in team members choosing a different building as target in cases where multiple instances of a building seem to be equidistant.
+
==Notes==
 +
ScriptActions that refer to individual buildings use a combination of the building index in the [[BuildingTypes]] list and a special target scan determinant. When the enemy has multiple instances of the same building, this determinant allows the AI team to select its target based on threat or distance. The final value used for these ScriptActions is formed like this:<br/>
 +
{{tt|Building Index + Target Scan Value (Decimal)}}<br/>
 +
The target scan values are as follows:
 +
{|class="wikitable"
 +
!Hex Value
 +
!Decimal Value
 +
!Description
 +
|-
 +
|{{tt|0x0}}
 +
|0
 +
|Lowest threat
 +
|-
 +
|{{tt|0x10000}}
 +
|65536
 +
|Highest threat
 +
|-
 +
|{{tt|0x20000}}
 +
|131072
 +
|Nearest
 +
|-
 +
|{{tt|0x30000}}
 +
|196608
 +
|Farthest
 +
|}
 +
For example, to make the AI team scan for the nearest enemy Allied War Factory, look for the 0-based index of the GAWEAP in the BuildingTypes list (7), add 131072, and use the result as the action parameter: 7 + 131072 = '''131079'''

Revision as of 11:03, 2 May 2019

Parameters Description
P1 (Action) P2 (Argument)
0 Target Type#1 Attack Target Type

This instructs the TeamType to use the TaskForce to approach and attack the target specified by the second parameter. These attack script actions are inherently self repeating. For example, when executing script action attack structure (0,2), the task force will attack the next structure when the current structure being attacked is destroyed and will continue to destroy enemy buildings until there are no more left. When no more target is left to attack, the script action is complete and the task force moves on to execute its next script action. The completion of this script action could get cut-short in cases the task force gets destroyed or runs out of ammo. Check TargetDistanceCoefficientDefault as it affects the target selection of these script actions. The following are the target types which can be used:

Value Target Type Description
0 N/A cancel attack mission
1 Anything anything [VehicleTypes], [AircraftTypes], [InfantryTypes] and [BuildingTypes]
2 Structures any enemy [BuildingTypes]
3 Ore Miners any enemy [VehicleTypes] with Harvester=yes set
4 Infantry any enemy [InfantryTypes]
5 Vehicles any enemy [VehicleTypes]
6 Factories any enemy [BuildingTypes] with a Factory= setting
7 Base Defenses any enemy [BuildingTypes] with IsBaseDefense=yes set
8 Base Threats any enemy objects approaching (or already in) its base and which are in an attack mission
9 Power Plants any enemy [BuildingTypes] with positive Power= values set
Red Alert 2 additions
10 Occupiable any [BuildingTypes] with CanBeOccupied=yes set (usually neutral structures)
11 Tech Buildings any [BuildingTypes] with NeedsEngineer=yes set (usually NeutralTechBuildings=)
1 Waypoint#1 Attack Waypoint

This instructs the TeamType to use the TaskForce to attack the waypoint number specified by the second parameter. If any members have Infiltrate=yes set they will enter the structure at the waypoint. Members with Engineer=yes set will capture the structure provided it does not have Capturable=no set or if it has NeedsEngineer=yes set. Members with Agent=yes set will spy on the structure if it has Spyable=yes set. Members that do not have Assaulter=no set will garrison the structure if it has CanBeOccupied=yes set. Members with C4=yes set will blow up the structure if does not have CanC4=no set. If there is no building at the specified waypoint, the TaskForce will attack the ground when reaching in range of the waypoint. Refer Waypoints for details on waypoint.

2 0 Go Berzerk

Forces infantry units with Cyborg=yes set to go berserk (they consider all objects, including friendly units, equally in their threat scan).(Doesn't seem to work).

3 Waypoint#1 Move To Waypoint

This instructs the TeamType to use the TaskForce to move to the waypoint number specified by the second parameter. Refer Waypoints for details on waypoint. TIP: you could use this script action to get a TeamType to move to Waypoint= number 99 (just about every map has this defined as the center point) - that will mean it will always strive to get to the center of the map, providing a good vantage point from which to perform further script actions and giving the impression that the computer is scouting for enemies.

4 CellTag#1 Move Into Specific Celltag

This instructs the TeamType to use the TaskForce to move into the CellTag specified by the second parameter. This is used when you want the TeamType to trigger a specific Action (when the game tests for the CellTag being entered). CellTags are attached to cells and are used to trigger Events and thus fire Actions when that cell is entered by a unit (or any unit from the TaskForce). The CellTag parameter should be the waypoint parameter for that CellTag from the [CellTags]listing in the map file, hence this script action is only of use on specific map files. Refer CellTags for details on celltag.

5 Time2 Guard Area

This instructs the TeamType to put the TaskForce into Guard Mode (same effect as selecting a group of units and pressing the Guard Mode key as defined in KEYBOARD.INI or clicking the relevant button on the Advanced Command Bar). Units will move to attack enemy units that fall within their range.

6 Action#1 Jump To Script Action

This is used to repeat actions within the ScriptType. The second parameter is the action line number of the ScriptType that you want to jump to.
Note: Script Action index starts at 0 whereas the line number starts at 1. So, to jump to the first Script Action whose index is 0, use n=6,1 for this script. Jump to line number could be specified to any of the preceding line numbers, not just to the first Script Action to create a loop of Script Actions.

7 0 Force Player Win

Forces a game win condition for the owner of the TeamType (they win the game).

8 Unload Behaviour#1 Unload

If the TaskForce contains a unit or units that have a valid Passengers= value set, and those units contain passengers, this command will make the units inside the transport(s) disembark. Note that once the passengers have disembarked, the transport itself is suspended until given a new mission and is therefore no longer considered a part of this TaskForce - this means that you cannot, for example, get units to disembark, do something, then get back into the transport in the same script. The second parameter can be used to control what happens to the transport after it 'deploys' its cargo:

Value Description
0 Keep transports and units - all remain in the team and execute the remainder of the script
1 Keep transport and lose the units - only the transport will execute the remainder of the script
2 Lose transport and keep units - only the units will execute the remainder of the script
3 Lose transports and lose units - nothing executes the remainder of the script
9 0 Deploy

If the TaskForce contains a unit or units that are able to deploy (for example a unit which DeploysInto= a [BuildingType] or has any of Deployer=yes, DeployFire=yes, DeployToFire=yes set) then this action causes them to deploy at the current cell they are occupying (same effect as selecting a unit and pressing the Deploy key as defined in KEYBOARD.INI or clicking the relevant button on the Advanced Command Bar).

10 0 Follow friendlies

This command causes the TaskForce to follow the nearest friendly unit when it moves although it will not function as if it is 'guarding' the unit. The following is not permanent, when the TaskForce is assigned another mission it abandons the following. TIP: If the support TeamType has this as the first line in its ScriptType, then it will escort the first TeamType.

11 Mission#1 Assign New Mission

The objects in the TaskForce are assigned the new mission defined by the second parameter. The actions such as Sleep/Sticky/Guard/Area Guard/Hunt etc. changes the state/mission in which the units are and those remain in that state until those units are destroyed or recruited into another team and given a different command. These actions are never ending, so these can't finish and move to next script action. Such script actions are given as the last script action in their scripts. The following are valid settings for the second parameter:

Value Name Description
Tiberian Sun and Firestorm
0 Sleep object sits around and plays dead, will not acquire targets
1 Attack special attack mission used by AI team types (utilizes threat rating logic)
2 Move simply moving to destination
3 QMove special move to destination after other queued moves occur
4 Retreat object runs away (may even leave the map)
5 Guard object sits around and will engage an enemy that falls within its weapon range
6 Sticky just like guard mode, except the object will engage enemies but not pursue them
7 Enter enter building or transport
8 Capture engineer entry logic used by MultiEngineer
9 Harvest the loop controlling harvesting of tiberium and dumping at a Refinery
10 Area Guard guard the general area where the object starts at
11 Return return to co-ordinating object (e.g. spawned object returns to the spawner)
12 Stop stop moving or firing at the first available opportunity
13 Ambush force fire (units with Infiltrate=yes will enter target if possible)
14 Hunt scan for and attack enemies wherever they may be on the map
15 Unload while dropping off cargo
16 Sabotage unit runs to place C4 on a building
17 Construction structures use this when building up after initial placement
18 Selling structures use this for deconstruction after being sold
19 Repair used when repairing an object (e.g. Service Depot)
20 Rescue special team over-ride mission
21 Missile #1uke Silo special launch missile mission
22 Harmless object doesn't fire and is not considered in any threat scan
23 Open while opening or closing a gate to allow passage
24 Patrol patrol a series of waypoints
Red Alert 2 and Yuri's Revenge
0 Sleep object sits around and plays dead, will not acquire targets
1 Attack special attack mission used by AI team types (utilizes threat rating logic)
2 Move simply moving to destination
3 QMove special move to destination after other queued moves occur
4 Retreat object runs away (may even leave the map)
5 Guard object sits around and will engage an enemy that falls within its weapon range
6 Sticky just like guard mode, except the object will engage enemies but not pursue them
7 Enter enter building or transport
8 Capture engineer entry logic used by MultiEngineer
9 Eaten when object is being repaired (applies only to structures)
10 Harvest the loop controlling harvesting of Ore and dumping at a Refinery
11 Area Guard guard the general area where the object starts at
12 Return return to co-ordinating object (e.g. spawned object returns to the spawner)
13 Stop stop moving or firing at the first available opportunity
14 Ambush force fire (units with Infiltrate=yes will enter target if possible)
15 Hunt scan for and attack enemies wherever they may be on the map
16 Unload while dropping off cargo (e.g. Landing Craft unloading passengers)
17 Sabotage unit runs to place C4 on a building or Ivan goes to place bomb on object
18 Construction structures use this when building up after initial placement
19 Selling structures use this for deconstruction after being sold
20 Repair used when repairing an object (e.g. Service Depot)
21 Rescue special team over-ride mission
22 Missile #1uke Silo special launch missile mission
23 Harmless object doesn't fire and is not considered in any threat scan
24 Open while opening or closing a gate to allow passage
25 Patrol patrol a series of waypoints
26 Paradrop Approach object is approaching the paradrop site
27 Paradrop Overfly object is flying over the paradrop site (i.e. dropping the paratroopers)
28 Wait paused and awaiting next mission
29 Move (special duplicate) used when Chrono units are moving to destination
30 Attack (special duplicate) used when units are deployed to fire (e.g. weapons with an area fire effect)
Yuri's Revenge additions
31 Spyplane Approach object is flying towards target
32 Spyplane Overfly object is flying over the target
12 Global Variable#1 Set Global Variable

The global variable number specified in the second parameter is defined as being 'set' (it is allocated a value of '1' or 'true'). This should be employed in specific map files only. This is part of the boolean logic employed by the global variables system in the game engine.

13 Sequence#1 Play Idle Anim Sequence

If the TaskForce contains a unit or units that use SHP graphics (i.e. infantry) then the relevant idle SHP sequence is displayed as defined by the frame numbering system in ART.INI.

14 0 Load Onto Transport

If the TaskForce contains a unit or units that have a valid Passengers= value set, and units whose Size= and PhysicalSize= settings allow them to be carried by that transport, this command will make the units enter the transport.

15 Waypoint#1 Spy On Structure At Waypoint

Should be used only for units with Infiltrate=yes and Agent=yes set. This instructs the TaskForce to enter the structure at the waypoint number specified by the second parameter and spy on the structure if it has Spyable=yes set. If there is no building at the specified waypoint, the TaskForce may not activate correctly and will just remain in their last mission. Refer Waypoints for details on waypoint.

16 Waypoint#1 Patrol to waypoint

This is similar to Move to waypoint. This instructs the TeamType to use the TaskForce to move to the waypoint number specified by the second parameter. The difference is that the units in the TaskForce will move out of their patrol route to actively go and engage any enemy objects that are within their Sight= as they move to the waypoint. NOTE: this action eats up processor time, because the TaskForce will scan for enemy objects with each movement. If you have a lot of TaskForces (or lots of units in them) engaged in this action, you will experience slowdown in the game - this is one reason why the single player missions are comparatively slow, they use this action a lot. The rate at which the scanning for targets whilst in this mission is controlled by the PatrolScan= statement in the [AI]section of RULES.INI. Refer Waypoints for details on waypoint.

17 Script#1 Change Script

Very handy and under utilized - this instructs the TaskForce to execute another ScriptType. The second parameter specifies the number of the ScriptType to execute as listed in the [ScriptTypes] table (consider the table as being numbered starting at 0 for this purpose).

18 Team#1 Change Team

This instructs the TaskForce to join another TeamType. The second parameter specifies the number of the TeamType to join as listed in the [TeamTypes] table (consider the table as being numbered starting at 0 for this purpose).

19 0 Panic

If the TaskForce contains a unit or units that have Fraidycat=yes set then they will run around aimlessly, using the Panic animation from their sequence as defined in ART.INI. Normally used for the civilian units. Units that do not fulfil this criteria lie down and act as if prone.

20 House#1 Change House Ownership

Used in single player missions on specific map files only, this changes ownership of the entire TeamType to the house number specified by the second parameter.

21 0 Scatter

This instructs the TaskForce to scatter (same effect as selecting a group of units and pressing the Scatter key as defined in KEYBOARD.INI).

22 0 Afraid & Run To Shroud

This instructs the TaskForce to behave in a scared manner and it will run to the nearest shrouded cell. The TaskForce will not actively engage in combat, will not acquire targets and will not retaliate (it will scatter instead if attacked).

23 0 Force Player Loss

Forces a game loss condition for the owner of the TeamType (they lose the game).

24 Speech#1 Play Speech

This instructs the TaskForce to play one of the Sofia or EVA voices (depending upon the ParentCountry= or the owner of this TaskForce). The second parameter is the number of the sound to be played from the [DialogList] in the EVA.INI (note that you should consider this list as being numbered from 0 instead of 1 to get the correct numbering convention).

25 Sound#1 Play Sound

This instructs the TaskForce to play one of the generic in game sounds from the [SoundList] in the SOUNDS.INI file (note that for all in game Action and Trigger purposes this number is from an internal table.

26 Movie#1 Play Movie

This instructs the TaskForce to play one of the movies from the [Movies] list in the ART.INI file (note that for all in game Action and Trigger purposes this number is from an internal table.

27 Theme#1 Play Theme

This instructs the TaskForce to play one of the game soundtracks from the [Themes] list in the Theme.INI file (note that for all in game Action and Trigger purposes this number is from an internal table.

28 0 Reduce Ore

Reduces the amount of Ore in the cell that the TeamType is occupying. Used by the special 'weapon' that is inherent with Ore Miners.

29 0 Begin Production

Forces the owner of the TeamType to begin the auto-production process (the AI's behaviour in skirmish games). Should only be used on AI controlled houses.

30 0 Force Sale

Forces the 'fire sale' of all remaining structures owned by the House= to which the TeamType belongs.

31 0 Suicide

This instructs the TaskForce to destroy itself. In effect it commits suicide, usually accompanied by an explosion.

32 Time#1 Start Storm In...

Initiates an Ion Storm (TS) or Weather Storm (RA2) after the time specified. In Red Alert 2, this initiates the Weather Storm intro effect (when the screen goes dark prior to the clouds appearing). The effect is set to be delayed by the number of seconds specified by parameter 2.

33 0 End Storm

This forces an end to the active Ion Storm or Weather Storm.

34 Team#1 Center Map On Team

This will center the screen on the TeamType. The same effect as hitting the Home key as defined in KEYBOARD.INI when the screen centers on your MCV (or the unit defined by the BaseUnit= statement in RULES.INI). The second parameter determines the speed at which the 'camera' switches view to the TaskForce with 0 being instant.

35 Time#1 Shroud Map For Time Interval

This action will shroud the entire map except for the area revealed by the player's own and/or friendly units. The second parameter determines the number of frames for which the map should remain shrouded after which the explored areas are revealed again.

36 Time#1 Reveal Map For Time Interval

This action will reveal the entire map. The second parameter determines the number of frames for which the map should remain revealed after which the map is shrouded again.

37 0 Delete Team Members

This forces dissolved members of the TaskForce to leave the map after which they are deleted (for example aerial transports after their passengers have disembarked).

38 Global Variable#1 Clear Global Variable

The global variable number specified in the second parameter is defined as being 'clear' (it is allocated a value of '0' or 'false'). This should be employed in specific map files only in which the global variable has been defined. This is part of the boolean logic employed by the global variables system in the game engine.

39 Local Variable#1 Set Local Variable

The local variable number specified in the second parameter is defined as being 'set' (it is allocated a value of '1' or 'true'). This should be employed in specific map files only in which the local variable has been defined. This is part of the boolean logic employed by the local variables system in the game engine.

40 Local Variable#1 Clear Local Variable

The local variable number specified in the second parameter is defined as being 'cleared' (it is allocated a value of '0' or 'false'). This should be employed in specific map files only in which the local variable has been defined. This is part of the boolean logic employed by the local variables system in the game engine.

41 0 Unpanic

If the TaskForce contains a unit or units that have Fraidycat=yes set which are currently assigned the Panic= sequence then this action nullifies that effect and the unit(s) adopt their default behaviour.

42 Direction#1 Change Facing

This instructs the TaskForce to turn and face the new direction specified by the second parameter. The facings are as follows:

Value Direction
0 North-East
1 East
2 South-East
3 South
4 South-West
5 West
6 North-West
7 North
43 0 Wait Until Fully Loaded

This is always used after members of the TaskForce have entered a transport in the same TaskForce and serves two purposes. The effect of this is that the transport will be used to carry out any subsequent movement or deploy actions but after that it is no longer considered a part of this TaskForce and as such is available to be recruited into new TeamTypes. It is this action which enables use of the TransportsReturnOnUnload=yes statement in the corresponding TeamType entry. The second purpose is to flag the transport as being 'loaded' with passengers and thus is considered in the AI's targeting logic as a potential threat (see the ContentScan= entry in the RULES.INI). This action also orders the transport to wait until it is fully loaded before executing any subsequent script actions.

44 0 Unload Truck (TRUCKB to TRUCKA)

Used purely for a graphical effect and applicable uniquely to the [TRUCKB] unit, this has the effect of converting [TRUCKB] into [TRUCKA] to give the impression that the unit has unloaded its cargo. Note: May not work correctly in Red Alert 2 since [TRUCKA] refers to the Demo Truck image which has no 'unloaded' image. Changing the image for the Demo Truck and assigning new units to [TRUCKA] and [TRUCKB] enables use of this logic.

45 0 Load Truck (TRUCKA to TRUCKB)

Used purely for a graphical effect and applicable uniquely to the [TRUCKA] unit, this has the effect of converting [TRUCKA] into [TRUCKB] to give the impression that the unit has been loaded with cargo. Note: May not work correctly in Red Alert 2 since [TRUCKA] refers to the Demo Truck image which has no 'unloaded' image. Changing the image for the Demo Truck and assigning new units to [TRUCKA] and [TRUCKB] enables use of this logic.

46 Structure#1 3 Attack Enemy Structure

Members of this TaskForce attack the enemy structure specified by the second parameter. This action depends upon the type of units in the TaskForce and if certain members have Infiltrate=yes set. Members with Engineer=yes set will capture the structure provided it does not have Capturable=no set or if it has NeedsEngineer=yes set. Members with Agent=yes set will spy on the structure if it has Spyable=yes set. Members that do not have Assaulter=no set will garrison the structure if it has CanBeOccupied=yes set. Members with C4=yes set will blow up the structure if does not have CanC4=no set.

47 Structure#1 3 Move To Enemy Structure

Members of this TaskForce move and stay adjacent to the enemy structure specified by the second parameter.

48 0 Scout

Causes members of this TaskForce to move to a pre-determined point on the map in an attempt to scout an area. The effect is that the TaskForce will move in one randomly chosen direction until it is no longer able to do so which can make it very useful or a waste of time depending on the direction chosen. If you want to continually scout the map, you should loop this script action.

49 0 Register success for AITrigger weight adjustment.

Executing this script action even once in a script by its task force is considered as a success. A script not containing this script action is a fail for its task force. A script containing this script action but the task force being unable to reach and execute this script action even once is a fail. These success and failure are used to adjust the current weight defined in AITriggers. Refer [[AITriggerTypes#1Weights|AITriggerType's weights]].

50 Flash#1 Flash (visual effect)

This causes the TaskForce to 'flash', the visual effect you get on an object when you order something to attack it. The second parameter is the number of times to flash the unit 'white'.

51 Animation#1 #1= Play Animation

This instructs the TaskForce to play one of the animations from the [Animations] in the RULES.INI.INI file (note that for all in game Action and Trigger purposes this number is from an internal table).

Firestorm addition
52 Talk Bubble#1 Display Talk Bubble

Should be used for single-unit TaskForces only, this causes a 'talk bubble' to appear above the unit. The second parameter determines which type of talk bubble to display. By default, the game has only three talk bubbles, though it's possible to add more and change what the bubbles represent:

Value Bubble
1 * (generic speech)
2 ? (question, confusion)
3 ! (alert, attention, shout)

Note: The length of time for which the talk bubble is displayed is controlled through the TalkBubbleTime= statement in RULES.INI. Refer to the RULES.INI Guide for details of this and the steps to take to enable its inclusion in Red Alert 2.

Red Alert 2 additions
53 0 Gather (at enemy base)

This causes the TaskForce to gather together (sometimes used when members of the TaskForce move at different speeds and you want the faster ones to stop while the slower ones catch up) after the previous action has been executed. If the TaskForce is in an attack mission and moving towards an enemy base, this command is usually executed when the first member of the TaskForce reaches the distance from that base defined by the AISafeDistance= statement in RULES.INI.

54 0 Regroup (at friendly base)

This causes the TaskForce to regroup, if for example any of its members have become engaged in a base defense mission or strayed away whilst in guard mode, or even the TeamType itself has been suspended for whatever reason. The members regroup directly next to each other leaving no 'gaps' at the nearest available point with sufficient space, and is used, for example, prior to activating the Iron Curtain so that all applicable members are affected (i.e. they fall within its range of effect).

55 0 Activate Iron Curtain on TaskForce

If the owner of the TaskForce to which this ScriptType is attached also has the Iron Curtain fully charged then it will be fired at this TaskForce. Note that the use of the Iron Curtain in this manner depends on the percentage chance of the AI incorporating them into its actions as defined by the AIMinorSuperReadyPercent= statement in RULES.INI.

56 Structure#1 3 ChronoSphere TaskForce

If the owner of the TaskForce to which this ScriptType is attached also has the Chronosphere fully charged then it will be used on the TaskForce before moving on to the next action. Note that the use of the Chronosphere in this manner depends on the percentage chance of the AI incorporating them into its actions as defined by the AIMinorSuperReadyPercent= statement in RULES.INI.

57 Structure#1 3 ChronoWarp TaskForce

If the owner of the TaskForce to which this ScriptType is attached has been Chronosphered then it will be used on the same TaskForce to shift them to the enemy structure number specified in the second parameter before moving on to the next action. Note that the use of the Chronosphere in this manner depends on the percentage chance of the AI incorporating them into its actions as defined by the AIMinorSuperReadyPercent= statement in RULES.INI.

58 Structure#1 3 Move To Friendly Structure

Members of this TaskForce move and stay adjacent to the friendly structure specified by the second parameter. The structure can be one owned by the owner of the TaskForce or any of its allies.

Yuri's Revenge additions
59 Waypoint#1 Attack Structure At Waypoint

Members of this TaskForce attack the structure at the waypoint specified by the second parameter. This action is very similar to action number 43 although this action does not test for ownership of the structure itself - thus the inclusion of this action allows, for example, InfantryTypes with Engineer=yes set to enter structures owned by the same side for the purposes of repair. This would be the most appropriate action to use to get the AI to repair bridges. Use of this also means that the TaskForce will attack the structure with one of its weapons meaning, for example, that units with C4=yes set will not C4 the building but shoot at it instead. This is useful if you want to get a TaskForce to destroy a nearby occupiable structure instead of entering it in a bid to prevent the enemy getting hold of it - a tactic used in the Yuri's Revenge AI.

60 0 Enter Grinder

Members of this TaskForce will enter the nearest structure with Grinding=yes set if it is owned by the owner of the TaskForce or any of its allies.

61 0 Occupy Tank Bunker

Any VehicleType members of this TaskForce which do not have Bunkerable=no set will enter the nearest vacant structure with Bunker=yes set if it is owned by the owner of the TaskForce or any of its allies.

62 0 Enter Bio Reactor

Any InfantryType members of this TaskForce will enter the nearest structure with InfantryAbsorb=yes set if it is owned by the owner of the TaskForce or any of its allies and has space available.

63 0 Occupy Battle Bunker

Any InfantryType members of this TaskForce with Occupier=yes set will enter the nearest structure (which they own) with CanOccupyFire=yes set.

64 0 Garrison Structure

Any InfantryType members of this TaskForce with Occupier=yes set will enter the nearest (neutral) structure with CanOccupyFire=yes set. This action is used specifically for this purpose due to action #159 (see above) since the logic in Yuri's Revenge has changed so that the units weapon is transferred to the structure. Use of this action also allows the computer to repair those structures by sending an InfantryType with Engineer=yes set into them and also allows the AI to differentiate between attacking such a structure and entering it, which is useful if you want the AI to use infantry to destroy an occupiable structure thus preventing its enemy from using it.

1 For convenience, the "#" symbol refers to a number/index of the object type. For example, "Waypoint#" refers to the index number of the Waypoint in the Waypoints list

2 Time to guard area in tenths of a minute (multiples of 6 seconds) at normal game speed.

3 Refers to the structure index in BuildingTypes combined with a unique target scan determinant. See the Notes section for more information

Notes

ScriptActions that refer to individual buildings use a combination of the building index in the BuildingTypes list and a special target scan determinant. When the enemy has multiple instances of the same building, this determinant allows the AI team to select its target based on threat or distance. The final value used for these ScriptActions is formed like this:
Building Index + Target Scan Value (Decimal)
The target scan values are as follows:

Hex Value Decimal Value Description
0x0 0 Lowest threat
0x10000 65536 Highest threat
0x20000 131072 Nearest
0x30000 196608 Farthest

For example, to make the AI team scan for the nearest enemy Allied War Factory, look for the 0-based index of the GAWEAP in the BuildingTypes list (7), add 131072, and use the result as the action parameter: 7 + 131072 = 131079