ScriptTypes/ScriptActions: Difference between revisions
m Fixup |
More information on Hunt and Attack: Anything |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 11: | Line 11: | ||
|- | |- | ||
|style="text-align: center;"|0 | |style="text-align: center;"|0 | ||
|style="text-align: center;"|Quarry Type#{{fnl|1}} | |style="text-align: center;"|Quarry Type#{{fnl|1}}{{fnl|2}} | ||
|'''Attack Quarry Type''' | |'''Attack Quarry Type''' | ||
This instructs the team | This instructs the team to approach and attack a target that fits the [[QuarryTypes|quarry type]] (target category){{fnl|1}} specified by the second parameter. Target selection from this category is based on nearest/first built depending on the scan range defined by [[TargetDistanceCoefficientDefault]] or its [[TechnoTypes|technotype]] override of [[TargetDistanceCoefficient]]. | ||
These attack missions are inherently self-repeating. For example, when executing script action {{tt|0,2}} ("attack building"), the task force will attack the next [[BuildingTypes|building]] when the current building being attacked is destroyed and will continue to destroy enemy buildings until there are no more left. When no more targets are left to attack, the script action is complete and the task force moves on to execute the next script action, if any. | These attack missions are inherently self-repeating. For example, when executing script action {{tt|0,2}} ("attack building"), the task force will attack the next [[BuildingTypes|building]] when the current building being attacked is destroyed and will continue to destroy enemy buildings until there are no more left. When no more targets are left to attack (either destroyed or inaccessible), the script action is complete and the task force moves on to execute the next script action, if any. | ||
Note that the completion of this script action can get cut short in case the task force gets destroyed or runs out of ammo. | Note that the completion of this script action can get cut short in case the task force gets destroyed or runs out of ammo. | ||
Line 27: | Line 27: | ||
|0 | |0 | ||
|N/A | |N/A | ||
| | |Cancel attack mission | ||
|- | |- | ||
|1 | |1 | ||
|Anything | |Anything | ||
| | |Enemy [[TechnoTypes|vehicle, aircraft, infantry or building]]. Target selection works the same as in the "Hunt" mission (see action {{tt|11}} below). However, unlike in Hunt, if the team is attacked, it will retaliate and pursue the attackers, provided that the team has {{f|Suicide|no|link}}. | ||
|- | |- | ||
|2 | |2 | ||
|Structures | |Structures | ||
| | |Enemy [[BuildingTypes|building]] | ||
|- | |- | ||
|3 | |3 | ||
|Harvesters/Ore Miners | |Harvesters, Refineries, and Silos /<br/>Ore Miners | ||
| | |Enemy vehicle with {{f|Harvester|yes|link}} set.<br/>In Tiberian Sun, this quarry also includes enemy Tiberium Refineries and Silos. | ||
|- | |- | ||
|4 | |4 | ||
|Infantry | |Infantry | ||
| | |Enemy [[InfantryTypes|infantry]] | ||
|- | |- | ||
|5 | |5 | ||
|Vehicles | |Vehicles | ||
| | |Enemy [[VehicleTypes|vehicle]] | ||
|- | |- | ||
|6 | |6 | ||
|Factories | |Factories | ||
| | |Enemy building with {{f|Factory|link}} set | ||
|- | |- | ||
|7 | |7 | ||
|Base Defenses | |Base Defenses | ||
| | |Enemy building with {{f|IsBaseDefense|yes|link}} set | ||
|- | |- | ||
|8 | |8 | ||
|Base Threats | |Base Threats | ||
| | |Enemy [[UnitTypes|unit]] approaching (or already in) its base and which are in an attack mission | ||
|- | |- | ||
|9 | |9 | ||
|Power Plants | |Power Plants | ||
| | |Enemy building with a positive {{f|Power|link}} value set | ||
|- | |- | ||
!colspan="3"|{{Ra2}} additions | !colspan="3"|{{Ra2}} additions | ||
Line 69: | Line 69: | ||
|10 | |10 | ||
|Occupiable | |Occupiable | ||
| | |Building with {{f|CanBeOccupied|yes|link}} set (usually neutral structures) | ||
|- | |- | ||
|11 | |11 | ||
|Tech Buildings | |Tech Buildings | ||
| | |Building with {{f|NeedsEngineer|yes|link}} set (usually [[NeutralTechBuildings|neutral tech buildings]]) | ||
|} | |} | ||
|- | |- | ||
|style="text-align: center;"|1 | |style="text-align: center;"|1 | ||
|style="text-align: center;"|Waypoint#{{fnl| | |style="text-align: center;"|Waypoint#{{fnl|2}} | ||
|'''Attack Waypoint''' | |'''Attack Waypoint''' | ||
This instructs the team to use the task force 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 task force will attack the ground when reaching in range of the waypoint. Refer [[Waypoints]] for details on waypoint. | This instructs the team to use the task force 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 task force will attack the ground when reaching in range of the waypoint. Refer [[Waypoints]] for details on waypoint. | ||
Line 83: | Line 83: | ||
|style="text-align: center;"|2 | |style="text-align: center;"|2 | ||
|style="text-align: center;"|0 | |style="text-align: center;"|0 | ||
|''' | |'''Go Berzerk''' | ||
{{obsolete|{{ts}} to {{yr}}|Go Berzerk}} | |||
Would have caused [[cyborg]] infantry in the team to go [[BerzerkAllowed|berserk]]. This action is obsolete, so the team simply moves on to the next action in the script, if present. | |||
|- | |- | ||
|style="text-align: center;"|3 | |style="text-align: center;"|3 | ||
|style="text-align: center;"|Waypoint#{{fnl| | |style="text-align: center;"|Waypoint#{{fnl|2}} | ||
|'''Move To Waypoint''' | |'''Move To Waypoint''' | ||
This instructs the team to use the task force to move to the waypoint number specified by the second parameter. Refer [[Waypoints]] for details on waypoint. | This instructs the team to use the task force to move to the waypoint number specified by the second parameter. Refer [[Waypoints]] for details on waypoint. | ||
Line 94: | Line 95: | ||
|- | |- | ||
|style="text-align: center;"|4 | |style="text-align: center;"|4 | ||
|style="text-align: center;"|Cell#{{fnl| | |style="text-align: center;"|Cell#{{fnl|2}} | ||
|'''Move Into Specific Cell''' | |'''Move Into Specific Cell''' | ||
This instructs the team to use the task force to move into the Cell specified by the second parameter. Cell number in the second parameter uses formula of (Y * 128) + X. With modulus operator being used to compute the X value from the given parameter, even if the X values used in the formula is 128 or higher, the resultant X value is limited to between 0 and 127. This action can be used when you want the team to trigger a specific [[Actions_(maps)|action]] (when the game tests for the cell tag being entered). Cell tags 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 task force). Refer [[CellTags]] for details on cell tags. | This instructs the team to use the task force to move into the Cell specified by the second parameter. Cell number in the second parameter uses formula of (Y * 128) + X. With modulus operator being used to compute the X value from the given parameter, even if the X values used in the formula is 128 or higher, the resultant X value is limited to between 0 and 127. This action can be used when you want the team to trigger a specific [[Actions_(maps)|action]] (when the game tests for the cell tag being entered). Cell tags 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 task force). Refer [[CellTags]] for details on cell tags. | ||
|- | |- | ||
|style="text-align: center;"|5 | |style="text-align: center;"|5 | ||
|style="text-align: center;"|Time{{fnl| | |style="text-align: center;"|Time{{fnl|3}} | ||
|'''Guard Area''' | |'''Guard Area''' | ||
This instructs the team to put the task force into Guard Mode for the amount of time specified. Units will move to attack enemy units that fall within their range. After guarding for the amount of time specified, the team will move on to execute its next script action. | This instructs the team to put the task force into Guard Mode for the amount of time specified. Units will move to attack enemy units that fall within their range. After guarding for the amount of time specified, the team will move on to execute its next script action. | ||
|- | |- | ||
|style="text-align: center;"|6 | |style="text-align: center;"|6 | ||
|style="text-align: center;"|Line#{{fnl| | |style="text-align: center;"|Line#{{fnl|2}} | ||
|'''Jump To Line #''' | |'''Jump To Line #''' | ||
This is used to repeat script actions within the script. The second parameter is the action ''line number'' of the [[ScriptTypes|script type]] 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 {{tt|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 actions. | This is used to repeat script actions within the script. The second parameter is the action ''line number'' of the [[ScriptTypes|script type]] 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 {{tt|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 actions. | ||
Line 114: | Line 115: | ||
|- | |- | ||
|style="text-align: center;"|8 | |style="text-align: center;"|8 | ||
|style="text-align: center;"|Unload Behaviour#{{fnl| | |style="text-align: center;"|Unload Behaviour#{{fnl|2}} | ||
|'''Unload''' | |'''Unload''' | ||
If the task force contains a unit or units that have a valid {{f|Passengers | If the task force 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 task force - 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" | {|class="wikitable" | ||
!Value | !Value | ||
Line 137: | Line 138: | ||
|style="text-align: center;"|0 | |style="text-align: center;"|0 | ||
|'''Deploy''' | |'''Deploy''' | ||
If the task force contains a unit or units that are able to deploy (for example a unit which {{f|DeploysInto | If the task force 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). | ||
|- | |- | ||
|style="text-align: center;"|10 | |style="text-align: center;"|10 | ||
Line 147: | Line 148: | ||
|- | |- | ||
|style="text-align: center;"|11 | |style="text-align: center;"|11 | ||
|style="text-align: center;"|Mission#{{fnl| | |style="text-align: center;"|Mission#{{fnl|2}} | ||
|'''Assign New Mission''' | |'''Assign New Mission''' | ||
The objects in the task force are assigned the | The objects in the task force are assigned the [[Mission Control|mission]] defined by the second parameter. | ||
Not all of the available mission types are applicable to teams; those that are, such as {{tt|Sleep}}, {{tt|Sticky}}, {{tt|Guard}}, {{tt|Area Guard}}, {{tt|Hunt}}, are perpetual by nature so once assigned to a team, the units in the team will remain in that mission until those units are destroyed, the team is dissolved, or the units are recruited into another team and given a different mission. Because the missions are never-ending, this script action can't finish and move to the next script action. Thus, this script action is best given as the last script action in the script. | |||
The following are valid settings for the second parameter: | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
Line 192: | Line 197: | ||
|8 | |8 | ||
|Capture | |Capture | ||
|engineer entry logic used by MultiEngineer | |engineer entry logic used by {{f|MultiEngineer|link}} | ||
|- | |- | ||
|9 | |9 | ||
Line 216: | Line 221: | ||
|14 | |14 | ||
|Hunt | |Hunt | ||
|scan for and attack enemies wherever they may be on the map | |scan for and attack enemies wherever they may be on the map. Chooses the target based on threat or first built. See [[TargetDistanceCoefficientDefault]] for more information. Will not retaliate if attacked. | ||
|- | |- | ||
|15 | |15 | ||
Line 294: | Line 299: | ||
|8 | |8 | ||
|Capture | |Capture | ||
|engineer entry logic used by MultiEngineer | |engineer entry logic used by {{f|MultiEngineer|link}} | ||
|- | |- | ||
|9 | |9 | ||
|Eaten | |Eaten | ||
| | |unit enters a [[Grinding|grinder]] | ||
|- | |- | ||
|10 | |10 | ||
Line 392: | Line 397: | ||
|- | |- | ||
|style="text-align: center;"|12 | |style="text-align: center;"|12 | ||
|style="text-align: center;"|Global Variable#{{fnl| | |style="text-align: center;"|Global Variable#{{fnl|2}} | ||
|'''Set Global Variable''' | |'''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. | 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. | ||
|- | |- | ||
|style="text-align: center;"|13 | |style="text-align: center;"|13 | ||
|style="text-align: center;"|Sequence#{{fnl| | |style="text-align: center;"|Sequence#{{fnl|2}} | ||
|'''Play Idle Anim Sequence''' | |'''Play Idle Anim Sequence''' | ||
If the task force 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. Parameter 0 for Idle1 and 1 for Idle2. | If the task force 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. Parameter 0 for Idle1 and 1 for Idle2. | ||
Line 404: | Line 409: | ||
|style="text-align: center;"|0 | |style="text-align: center;"|0 | ||
|'''Load Onto Transport''' | |'''Load Onto Transport''' | ||
If the task force contains a unit or units that have a valid {{f|Passengers | If the task force 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. | ||
|- | |- | ||
|style="text-align: center;"|15 | |style="text-align: center;"|15 | ||
|style="text-align: center;"|Waypoint#{{fnl| | |style="text-align: center;"|Waypoint#{{fnl|2}} | ||
|'''Spy On Structure At Waypoint''' | |'''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 task force 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 task force 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 task force 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 task force may not activate correctly and will just remain in their last mission. Refer [[Waypoints]] for details on waypoint. | ||
|- | |- | ||
|style="text-align: center;"|16 | |style="text-align: center;"|16 | ||
|style="text-align: center;"|Waypoint#{{fnl| | |style="text-align: center;"|Waypoint#{{fnl|2}} | ||
|'''Patrol To Waypoint''' | |'''Patrol To Waypoint''' | ||
This is similar to Move to waypoint. This instructs the team to use the task force to move to the waypoint number specified by the second parameter. The difference is that the units in the task force will move out of their patrol route to actively go and engage any enemy objects that are within their {{f|Sight | This is similar to Move to waypoint. This instructs the team to use the task force to move to the waypoint number specified by the second parameter. The difference is that the units in the task force 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 patrol mission eats up processor time, because the task force will scan for enemy objects with each movement. If you have a lot of task forces (or lots of units in them) engaged in this mission, you will experience slowdown in the game - this is one reason why the single player missions are comparatively slow, they use this mission a lot. The rate at which the scanning for targets whilst in this mission is controlled by the {{f|PatrolScan | '''Note''': This patrol mission eats up processor time, because the task force will scan for enemy objects with each movement. If you have a lot of task forces (or lots of units in them) engaged in this mission, you will experience slowdown in the game - this is one reason why the single player missions are comparatively slow, they use this mission 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. | ||
|- | |- | ||
|style="text-align: center;"|17 | |style="text-align: center;"|17 | ||
|style="text-align: center;"|Script#{{fnl| | |style="text-align: center;"|Script#{{fnl|2}} | ||
|'''Change Script''' | |'''Change Script''' | ||
{{obsolete|{{ts}}|Change Script}} | |||
Very handy and under utilized - this instructs the task force to execute another script. The second parameter specifies the number of the [[ScriptTypes|script type]] to execute as listed in the {{tt|[ScriptTypes]}} table (consider the table as being numbered starting at 0 for this purpose). | Very handy and under utilized - this instructs the task force to execute another script. The second parameter specifies the number of the [[ScriptTypes|script type]] to execute as listed in the {{tt|[ScriptTypes]}} table (consider the table as being numbered starting at 0 for this purpose). | ||
Appears not to work, at least in Tiberian Sun. | |||
|- | |- | ||
|style="text-align: center;"|18 | |style="text-align: center;"|18 | ||
|style="text-align: center;"|Team#{{fnl| | |style="text-align: center;"|Team#{{fnl|2}} | ||
|'''Change Team''' | |'''Change Team''' | ||
This instructs the task force to | This instructs the task force to switch to another team. The second parameter specifies the number of the [[TeamTypes|team type]] to switch to as listed in the {{tt|[TeamTypes]}} table (consider the table as being numbered starting at 0 for this purpose). | ||
{{W}} '''Note:''' The game loads team types from {{ini|ai}} first, then [[aifs.ini]] second ([[RequiredAddOn|if applicable]]), and the current map last. Because this action refers to a team by its index, it's prone to break as the index will change whenever you add or remove teams from any of the AI [[INIs]]. Therefore it is ''not'' recommended to use this action. A much more reliable method is to use [[Actions_(maps)|trigger actions]] to recruit the units to a new team, as triggers refer to teams by their names, not indexes. | |||
|- | |- | ||
|style="text-align: center;"|19 | |style="text-align: center;"|19 | ||
Line 434: | Line 444: | ||
|- | |- | ||
|style="text-align: center;"|20 | |style="text-align: center;"|20 | ||
|style="text-align: center;"|House#{{fnl| | |style="text-align: center;"|House#{{fnl|2}} | ||
|'''Change House Ownership''' | |'''Change House Ownership''' | ||
Used in single player missions on specific map files only, this changes ownership of the entire team 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 team to the house number specified by the second parameter. | ||
Line 454: | Line 464: | ||
|- | |- | ||
|style="text-align: center;"|24 | |style="text-align: center;"|24 | ||
|style="text-align: center;"|Speech#{{fnl| | |style="text-align: center;"|Speech#{{fnl|2}} | ||
|'''Play Speech''' | |'''Play Speech''' | ||
This instructs the task force to play one of the Sofia or EVA voices (depending upon the {{f|ParentCountry | This instructs the task force to play one of the Sofia or EVA voices (depending upon the {{f|ParentCountry|link}} or the owner of this task force). 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). | ||
|- | |- | ||
|style="text-align: center;"|25 | |style="text-align: center;"|25 | ||
|style="text-align: center;"|Sound#{{fnl| | |style="text-align: center;"|Sound#{{fnl|2}} | ||
|'''Play Sound''' | |'''Play Sound''' | ||
This instructs the task force to play one of the generic in game sounds from the {{sl|SoundList}} in the [[Sounds.ini|SOUNDS.INI]] file. | This instructs the task force to play one of the generic in game sounds from the {{sl|SoundList}} in the [[Sounds.ini|SOUNDS.INI]] file. | ||
|- | |- | ||
|style="text-align: center;"|26 | |style="text-align: center;"|26 | ||
|style="text-align: center;"|Movie#{{fnl| | |style="text-align: center;"|Movie#{{fnl|2}} | ||
|'''Play Movie''' | |'''Play Movie''' | ||
This instructs the task force to play one of the movies from the {{sl|Movies}} list in the [[Art.ini|ART.INI]] file. | This instructs the task force to play one of the movies from the {{sl|Movies}} list in the [[Art.ini|ART.INI]] file. | ||
|- | |- | ||
|style="text-align: center;"|27 | |style="text-align: center;"|27 | ||
|style="text-align: center;"|Theme#{{fnl| | |style="text-align: center;"|Theme#{{fnl|2}} | ||
|'''Play Theme''' | |'''Play Theme''' | ||
This instructs the task force to play one of the game soundtracks from the {{sl|Themes}} list in the [[Theme.ini|Theme.INI]] file. | This instructs the task force to play one of the game soundtracks from the {{sl|Themes}} list in the [[Theme.ini|Theme.INI]] file. | ||
Line 494: | Line 504: | ||
|- | |- | ||
|style="text-align: center;"|32 | |style="text-align: center;"|32 | ||
|style="text-align: center;"|Time#{{fnl| | |style="text-align: center;"|Time#{{fnl|2}} | ||
|'''Start Storm In...''' | |'''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. | 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. | ||
Line 504: | Line 514: | ||
|- | |- | ||
|style="text-align: center;"|34 | |style="text-align: center;"|34 | ||
|style="text-align: center;"|Speed#{{fnl| | |style="text-align: center;"|Speed#{{fnl|2}} | ||
|'''Center Map On Team''' | |'''Center Map On Team''' | ||
This will center the screen on the team. 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 | This will center the screen on the team. 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 task force with 0 being slow to 4 being fast. | ||
|- | |- | ||
|style="text-align: center;"|35 | |style="text-align: center;"|35 | ||
|style="text-align: center;"|Time#{{fnl| | |style="text-align: center;"|Time#{{fnl|2}} | ||
|'''Shroud Map For Time Interval''' | |'''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. | 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. | ||
|- | |- | ||
|style="text-align: center;"|36 | |style="text-align: center;"|36 | ||
|style="text-align: center;"|Time#{{fnl| | |style="text-align: center;"|Time#{{fnl|2}} | ||
|'''Reveal Map For Time Interval''' | |'''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. | 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. | ||
Line 524: | Line 534: | ||
|- | |- | ||
|style="text-align: center;"|38 | |style="text-align: center;"|38 | ||
|style="text-align: center;"|Global Variable#{{fnl| | |style="text-align: center;"|Global Variable#{{fnl|2}} | ||
|'''Clear Global Variable''' | |'''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. | 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. | ||
|- | |- | ||
|style="text-align: center;"|39 | |style="text-align: center;"|39 | ||
|style="text-align: center;"|Local Variable#{{fnl| | |style="text-align: center;"|Local Variable#{{fnl|2}} | ||
|'''Set Local Variable''' | |'''Set Local Variable''' | ||
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 [[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. | ||
|- | |- | ||
|style="text-align: center;"|40 | |style="text-align: center;"|40 | ||
|style="text-align: center;"|Local Variable#{{fnl| | |style="text-align: center;"|Local Variable#{{fnl|2}} | ||
|'''Clear Local Variable''' | |'''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. | 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. | ||
Line 544: | Line 554: | ||
|- | |- | ||
|style="text-align: center;"|42 | |style="text-align: center;"|42 | ||
|style="text-align: center;"|Direction#{{fnl| | |style="text-align: center;"|Direction#{{fnl|2}} | ||
|'''Change Facing''' | |'''Change Facing''' | ||
This instructs the task force to turn and face the new direction specified by the second parameter. The facings are as follows: | This instructs the task force to turn and face the new direction specified by the second parameter. The facings are as follows: | ||
{|class="wikitable" | {|class="wikitable" | ||
!Value | !Value | ||
!Direction Type{{fnl| | !Direction Type{{fnl|5}} | ||
!Direction | !Direction | ||
|- | |- | ||
Line 588: | Line 598: | ||
|style="text-align: center;"|0 | |style="text-align: center;"|0 | ||
|'''Wait Until Fully Loaded''' | |'''Wait Until Fully Loaded''' | ||
This is always used after members of the task force have entered a transport in the same task force 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 task force and as such is available to be recruited into new teams. It is this action which enables use of the {{f|TransportsReturnOnUnload|yes|link}} statement in the corresponding team type 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 | This is always used after members of the task force have entered a transport in the same task force 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 task force and as such is available to be recruited into new teams. It is this action which enables use of the {{f|TransportsReturnOnUnload|yes|link}} statement in the corresponding team type 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. | ||
|- | |- | ||
|style="text-align: center;"|44 | |style="text-align: center;"|44 | ||
Line 603: | Line 613: | ||
|- | |- | ||
|style="text-align: center;"|46 | |style="text-align: center;"|46 | ||
|style="text-align: center;"|BwP{{fnl| | |style="text-align: center;"|BwP{{fnl|4}} | ||
|'''Attack Enemy Structure''' | |'''Attack Enemy Structure''' | ||
Members of this task force attack the enemy structure specified by the second parameter. This action depends upon the type of units in the task force 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 task force attack the enemy structure specified by the second parameter. This action depends upon the type of units in the task force 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. | ||
|- | |- | ||
|style="text-align: center;"|47 | |style="text-align: center;"|47 | ||
|style="text-align: center;"|BwP{{fnl| | |style="text-align: center;"|BwP{{fnl|4}} | ||
|'''Move To Enemy Structure''' | |'''Move To Enemy Structure''' | ||
Members of this task force move and stay adjacent to the enemy structure specified by the second parameter. | Members of this task force move and stay adjacent to the enemy structure specified by the second parameter. | ||
Line 628: | Line 638: | ||
|- | |- | ||
|style="text-align: center;"|51 | |style="text-align: center;"|51 | ||
|style="text-align: center;"|Animation#{{fnl| | |style="text-align: center;"|Animation#{{fnl|2}} | ||
|'''Play Animation''' | |'''Play Animation''' | ||
This instructs the task force to play one of the animations from the {{sl|Animations}} list. | This instructs the task force to play one of the animations from the {{sl|Animations}} list. | ||
Line 635: | Line 645: | ||
|- | |- | ||
|style="text-align: center;"|52 | |style="text-align: center;"|52 | ||
|style="text-align: center;"|Talk Bubble#{{fnl| | |style="text-align: center;"|Talk Bubble#{{fnl|2}} | ||
|'''Display Talk Bubble''' | |'''Display Talk Bubble''' | ||
Should be used for single-unit task forces 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: | Should be used for single-unit task forces 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: | ||
Line 652: | Line 662: | ||
|} | |} | ||
'''Note''': The length of time for which the talk bubble is displayed is controlled through the {{f|TalkBubbleTime | '''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 | !colspan="3"|{{Ra2}} additions | ||
Line 659: | Line 669: | ||
|style="text-align: center;"|0 | |style="text-align: center;"|0 | ||
|'''Gather (At Enemy Base)''' | |'''Gather (At Enemy Base)''' | ||
This causes the task force to gather together (sometimes used when members of the task force move at different speeds and you want the faster ones to stop while the slower ones catch up) after the previous script action has been executed. If the task force is in an attack mission and moving towards an enemy base, this command is usually executed when the first member of the task force reaches the distance from that base defined by the {{f|AISafeDistance | This causes the task force to gather together (sometimes used when members of the task force move at different speeds and you want the faster ones to stop while the slower ones catch up) after the previous script action has been executed. If the task force is in an attack mission and moving towards an enemy base, this command is usually executed when the first member of the task force reaches the distance from that base defined by the {{f|AISafeDistance|link}} statement in RULES.INI. | ||
|- | |- | ||
|style="text-align: center;"|54 | |style="text-align: center;"|54 | ||
Line 669: | Line 679: | ||
|style="text-align: center;"|0 | |style="text-align: center;"|0 | ||
|'''Activate Iron Curtain On Task Force''' | |'''Activate Iron Curtain On Task Force''' | ||
If the owner of the task force to which this script is attached also has the Iron Curtain fully charged then it will be fired at this task force. 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 | If the owner of the task force to which this script is attached also has the Iron Curtain fully charged then it will be fired at this task force. 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. | ||
|- | |- | ||
|style="text-align: center;"|56 | |style="text-align: center;"|56 | ||
|style="text-align: center;"|BwP{{fnl| | |style="text-align: center;"|BwP{{fnl|4}} | ||
|'''Chronoshift Task Force to a building''' | |'''Chronoshift Task Force to a building''' | ||
If the owner of the task force to which this script is attached also has the Chronosphere fully charged then it will be used on the task force to transport it to the enemy structure specified by the second parameter, before moving on to the next script 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 | If the owner of the task force to which this script is attached also has the Chronosphere fully charged then it will be used on the task force to transport it to the enemy structure specified by the second parameter, before moving on to the next script 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. | ||
|- | |- | ||
|style="text-align: center;"|57 | |style="text-align: center;"|57 | ||
|style="text-align: center;"|Quarry Type#{{fnl| | |style="text-align: center;"|Quarry Type#{{fnl|2}} | ||
|'''Chronoshift Task Force to a target type''' | |'''Chronoshift Task Force to a target type''' | ||
If the owner of the task force to which this script is attached also has the Chronosphere fully charged then it will be used on the task force to transport it to a target that fits the [[QuarryTypes|quarry type]] (target category) specified by the second parameter | If the owner of the task force to which this script is attached also has the Chronosphere fully charged then it will be used on the task force to transport it to a target that fits the [[QuarryTypes|quarry type]] (target category) specified by the second parameter, before moving on to the next script action. Target selection is based on nearest/first built depending on the scan range defined by [[TargetDistanceCoefficientDefault]] or its [[TechnoTypes|technotype]] override of [[TargetDistanceCoefficient]]. 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. | ||
|- | |- | ||
|style="text-align: center;"|58 | |style="text-align: center;"|58 | ||
|style="text-align: center;"|BwP{{fnl| | |style="text-align: center;"|BwP{{fnl|4}} | ||
|'''Move To Friendly Structure''' | |'''Move To Friendly Structure''' | ||
Members of this task force move and stay adjacent to the friendly structure specified by the second parameter. The structure can be one owned by the owner of the task force or any of its allies. | Members of this task force move and stay adjacent to the friendly structure specified by the second parameter. The structure can be one owned by the owner of the task force or any of its allies. | ||
Line 689: | Line 699: | ||
|- | |- | ||
|style="text-align: center;"|59 | |style="text-align: center;"|59 | ||
|style="text-align: center;"|Waypoint#{{fnl| | |style="text-align: center;"|Waypoint#{{fnl|2}} | ||
|'''Attack Structure At Waypoint''' | |'''Attack Structure At Waypoint''' | ||
Members of this task force attack the structure at the waypoint specified by the second parameter. This script action is very similar to script action no. {{tt|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 task force 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 task force 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 task force attack the structure at the waypoint specified by the second parameter. This script action is very similar to script action no. {{tt|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 task force 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 task force 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. | ||
Line 719: | Line 729: | ||
|} | |} | ||
{{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|1|[https://en.wiktionary.org/wiki/quarry#Etymology_2 Quarry] as in the sense of prey or target, not mine.}} | ||
{{fn| | {{fn|2|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| | {{fn|3|Time to guard area. In {{ts}}, the time is measured in seconds at default game speed (15 FPS). In {{ra2}} and {{yr}}, the time is measured in tenths of a minute (multiples of 6 seconds) at normal game speed.}} | ||
{{fn| | {{fn|4|'''B'''uilding '''w'''ith '''P'''roperty is the computed value of the building's index in [[BuildingTypes]] and the AI's choice for target selection. See the [[#Notes|notes]] below for more information.}} | ||
{{fn|5|Note that the internal "compass" is tilted due to the game's dimetric projection, i.e. internal North is top-right, North-East is right, etc.}} | |||
==Notes== | ==Notes== |
Latest revision as of 15:25, 13 September 2024
Script actions are the steps that determine what each script actually does, in the same vein as actions determine what a trigger does.
The following action types are available:
Parameters | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
P1 (Script Action) | P2 (Argument) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0 | Quarry Type#12 | Attack Quarry Type
This instructs the team to approach and attack a target that fits the quarry type (target category)1 specified by the second parameter. Target selection from this category is based on nearest/first built depending on the scan range defined by TargetDistanceCoefficientDefault or its technotype override of TargetDistanceCoefficient. These attack missions are inherently self-repeating. For example, when executing script action 0,2 ("attack building"), the task force will attack the next building when the current building being attacked is destroyed and will continue to destroy enemy buildings until there are no more left. When no more targets are left to attack (either destroyed or inaccessible), the script action is complete and the task force moves on to execute the next script action, if any. Note that the completion of this script action can get cut short in case the task force gets destroyed or runs out of ammo. The following are the quarry type values which can be used:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 | Waypoint#2 | Attack Waypoint
This instructs the team to use the task force 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 task force will attack the ground when reaching in range of the waypoint. Refer Waypoints for details on waypoint. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | 0 | Go Berzerk
Logic related to Go Berzerk, as a whole or in part, is obsolete in Tiberian Sun to Yuri's Revenge.
Would have caused cyborg infantry in the team to go berserk. This action is obsolete, so the team simply moves on to the next action in the script, if present. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | Waypoint#2 | Move To Waypoint
This instructs the team to use the task force to move to the waypoint number specified by the second parameter. Refer Waypoints for details on waypoint. Tip: You can use this action to get a team to move to waypoint no. 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 actions and giving the impression that the computer is scouting for enemies. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | Cell#2 | Move Into Specific Cell
This instructs the team to use the task force to move into the Cell specified by the second parameter. Cell number in the second parameter uses formula of (Y * 128) + X. With modulus operator being used to compute the X value from the given parameter, even if the X values used in the formula is 128 or higher, the resultant X value is limited to between 0 and 127. This action can be used when you want the team to trigger a specific action (when the game tests for the cell tag being entered). Cell tags 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 task force). Refer CellTags for details on cell tags. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | Time3 | Guard Area
This instructs the team to put the task force into Guard Mode for the amount of time specified. Units will move to attack enemy units that fall within their range. After guarding for the amount of time specified, the team will move on to execute its next script action. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | Line#2 | Jump To Line #
This is used to repeat script actions within the script. The second parameter is the action line number of the script type that you want to jump to. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | 0 | Force Player Win
Forces a game win condition for the owner of the team (they win the game). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | Unload Behaviour#2 | Unload
If the task force 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 task force - 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:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 | 0 | Deploy
If the task force 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 task force 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 task force is assigned another mission it abandons the following. Tip: If the secondary (support) team has this as the first line in its script, then it will escort the primary team. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | Mission#2 | Assign New Mission
The objects in the task force are assigned the mission defined by the second parameter. Not all of the available mission types are applicable to teams; those that are, such as Sleep, Sticky, Guard, Area Guard, Hunt, are perpetual by nature so once assigned to a team, the units in the team will remain in that mission until those units are destroyed, the team is dissolved, or the units are recruited into another team and given a different mission. Because the missions are never-ending, this script action can't finish and move to the next script action. Thus, this script action is best given as the last script action in the script. The following are valid settings for the second parameter:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | Global Variable#2 | 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#2 | Play Idle Anim Sequence
If the task force 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. Parameter 0 for Idle1 and 1 for Idle2. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
14 | 0 | Load Onto Transport
If the task force 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#2 | Spy On Structure At Waypoint
Should be used only for units with Infiltrate=yes and Agent=yes set. This instructs the task force 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 task force may not activate correctly and will just remain in their last mission. Refer Waypoints for details on waypoint. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 | Waypoint#2 | Patrol To Waypoint
This is similar to Move to waypoint. This instructs the team to use the task force to move to the waypoint number specified by the second parameter. The difference is that the units in the task force 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 patrol mission eats up processor time, because the task force will scan for enemy objects with each movement. If you have a lot of task forces (or lots of units in them) engaged in this mission, you will experience slowdown in the game - this is one reason why the single player missions are comparatively slow, they use this mission 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#2 | Change Script
Logic related to Change Script, as a whole or in part, is obsolete in Tiberian Sun.
Very handy and under utilized - this instructs the task force to execute another script. The second parameter specifies the number of the script type to execute as listed in the [ScriptTypes] table (consider the table as being numbered starting at 0 for this purpose). Appears not to work, at least in Tiberian Sun. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
18 | Team#2 | Change Team
This instructs the task force to switch to another team. The second parameter specifies the number of the team type to switch to as listed in the [TeamTypes] table (consider the table as being numbered starting at 0 for this purpose). Note: The game loads team types from ai(md).ini first, then aifs.ini second (if applicable), and the current map last. Because this action refers to a team by its index, it's prone to break as the index will change whenever you add or remove teams from any of the AI INIs. Therefore it is not recommended to use this action. A much more reliable method is to use trigger actions to recruit the units to a new team, as triggers refer to teams by their names, not indexes. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
19 | 0 | Panic
If the task force 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#2 | Change House Ownership
Used in single player missions on specific map files only, this changes ownership of the entire team to the house number specified by the second parameter. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
21 | 0 | Scatter
This instructs the task force 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 task force to behave in a scared manner and it will run to the nearest shrouded cell. The task force 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 team (they lose the game). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
24 | Speech#2 | Play Speech
This instructs the task force to play one of the Sofia or EVA voices (depending upon the ParentCountry or the owner of this task force). 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#2 | Play Sound
This instructs the task force to play one of the generic in game sounds from the [SoundList] in the SOUNDS.INI file. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
26 | Movie#2 | Play Movie
This instructs the task force to play one of the movies from the [Movies] list in the ART.INI file. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
27 | Theme#2 | Play Theme
This instructs the task force to play one of the game soundtracks from the [Themes] list in the Theme.INI file. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
28 | 0 | Reduce Tiberium/Ore
Reduces the amount of Tiberium/Ore in the cell that the team is occupying. Used by the special 'weapon' that is inherent with Harvesters/Ore Miners. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
29 | 0 | Begin Production
Forces the owner of the team 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 team belongs. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
31 | 0 | Suicide
This instructs the task force to destroy itself. In effect it commits suicide, usually accompanied by an explosion. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
32 | Time#2 | 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 | Speed#2 | Center Map On Team
This will center the screen on the team. 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 task force with 0 being slow to 4 being fast. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
35 | Time#2 | 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#2 | 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
Deletes members of this task force from the map. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
38 | Global Variable#2 | 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#2 | 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#2 | 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 task force 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#2 | Change Facing
This instructs the task force to turn and face the new direction specified by the second parameter. The facings are as follows:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
43 | 0 | Wait Until Fully Loaded
This is always used after members of the task force have entered a transport in the same task force 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 task force and as such is available to be recruited into new teams. It is this action which enables use of the TransportsReturnOnUnload=yes statement in the corresponding team type 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 | BwP4 | Attack Enemy Structure
Members of this task force attack the enemy structure specified by the second parameter. This action depends upon the type of units in the task force 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 | BwP4 | Move To Enemy Structure
Members of this task force move and stay adjacent to the enemy structure specified by the second parameter. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
48 | 0 | Scout
Causes members of this task force to move to a pre-determined point on the map in an attempt to scout an area. The effect is that the task force 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
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 action even once is a fail. These success and failure are used to adjust the current weight defined in AITriggers. Refer AITriggerType's weights. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
50 | Time Frames | Flash
This causes all members of the task force to 'flash', the visual effect you get on an object when you order something to attack it. The second parameter is the number of time frames to flash the unit 'white'. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
51 | Animation#2 | Play Animation
This instructs the task force to play one of the animations from the [Animations] list. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Firestorm addition | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
52 | Talk Bubble#2 | Display Talk Bubble
Should be used for single-unit task forces 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:
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 task force to gather together (sometimes used when members of the task force move at different speeds and you want the faster ones to stop while the slower ones catch up) after the previous script action has been executed. If the task force is in an attack mission and moving towards an enemy base, this command is usually executed when the first member of the task force reaches the distance from that base defined by the AISafeDistance statement in RULES.INI. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
54 | 0 | Regroup (At Friendly Base)
This causes the task force 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 team 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 Task Force
If the owner of the task force to which this script is attached also has the Iron Curtain fully charged then it will be fired at this task force. 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 | BwP4 | Chronoshift Task Force to a building
If the owner of the task force to which this script is attached also has the Chronosphere fully charged then it will be used on the task force to transport it to the enemy structure specified by the second parameter, before moving on to the next script 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 | Quarry Type#2 | Chronoshift Task Force to a target type
If the owner of the task force to which this script is attached also has the Chronosphere fully charged then it will be used on the task force to transport it to a target that fits the quarry type (target category) specified by the second parameter, before moving on to the next script action. Target selection is based on nearest/first built depending on the scan range defined by TargetDistanceCoefficientDefault or its technotype override of TargetDistanceCoefficient. 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 | BwP4 | Move To Friendly Structure
Members of this task force move and stay adjacent to the friendly structure specified by the second parameter. The structure can be one owned by the owner of the task force or any of its allies. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Yuri's Revenge additions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
59 | Waypoint#2 | Attack Structure At Waypoint
Members of this task force attack the structure at the waypoint specified by the second parameter. This script action is very similar to script action no. 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 task force 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 task force 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 task force will enter the nearest structure with Grinding=yes set if it is owned by the owner of the task force or any of its allies. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
61 | 0 | Occupy Tank Bunker
Any VehicleType members of this task force 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 task force or any of its allies. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
62 | 0 | Enter Bio Reactor
Any InfantryType members of this task force will enter the nearest structure with InfantryAbsorb=yes set if it is owned by the owner of the task force or any of its allies and has space available. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
63 | 0 | Occupy Battle Bunker
Any InfantryType members of this task force 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 task force with Occupier=yes set will enter the nearest (neutral) structure with CanOccupyFire=yes set. This script action is used specifically for this purpose due to action no. 59 (see above) since the logic in Yuri's Revenge has changed so that the unit's 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 ↑ Quarry as in the sense of prey or target, not mine.
2 ↑ 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.
3 ↑ Time to guard area. In Tiberian Sun, the time is measured in seconds at default game speed (15 FPS). In Red Alert 2 and Yuri's Revenge, the time is measured in tenths of a minute (multiples of 6 seconds) at normal game speed.
4 ↑ Building with Property is the computed value of the building's index in BuildingTypes and the AI's choice for target selection. See the notes below for more information.
5 ↑ Note that the internal "compass" is tilted due to the game's dimetric projection, i.e. internal North is top-right, North-East is right, etc.
Notes
Building with Property (BwP) number
This number allows the AI to target a specific instance of a building based on threat or distance when there are multiple instances of the specified building. When there is only one instance of a specified building then there is only one building to select, so the outcome based on options of threat or distance is the same. The computation of this building number is as follows:
Computed Value | Description |
---|---|
0 (Hex 0x0) + Building Index | Select the instance of the building with least threat |
65536 (Hex 0x10000) + Building Index | Select the instance of the building with highest threat |
131072 (Hex 0x20000) + Building Index | Select the instance of the building which is nearest |
196608 (Hex 0x30000) + Building Index | Select the instance of the building which is farthest |
Reference to a building number exceeding the buildings in the BuildingTypes list or using number 262144 or higher, results in a do-nothing script action and the team will move on to execute its next script action.
Threat posed by any number of instances of the same building will all be the same. So, to determine which instance of a building has higher or lower threat, its cumulative threat value is used. For example, if there are some units near a building, its threat rating becomes higher with the additional threat values of the nearby units.
In cases where multiple instances of the specified building have equal threat or are equidistant, AI will choose the one which was constructed first by the target side. If the first was destroyed/sold etc., then the next constructed building becomes target. Friendlies don't pose threat, so it becomes a case of equal threat.
Example of BwP number computation: to make the AI team members select their nearest enemy Allied War Factory, look for the 0-based index of the GAWEAP in the BuildingTypes list (7), add 131072, and use the resulting structure number as the script action parameter: 7 + 131072 = 131079.