The second parameter can be used to control what happens to the transport after it 'deploys' its cargo: 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. 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. 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.įorces a game win condition for the owner of the TeamType (they win the game). So, to jump to the first Script Action whose index is 0, use n=6,1 for this script.
Note: Script Action index starts at 0 whereas the line number starts at 1. The second parameter is the action line number of the ScriptType that you want to jump to. This is used to repeat actions within the ScriptType. After guarding for the amount of time specified, the team will move on to execute its next script action. Units will move to attack enemy units that fall within their range. This instructs the TeamType to put the TaskForce into Guard Mode for the amount of time specified. 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). This action can be used when you want the TeamType to trigger a specific Action (when the game tests for the CellTag being entered). 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. Cell number in the second parameter uses formula of (Y * 128) + X.
This instructs the TeamType to use the TaskForce to move into the Cell specified by the second parameter. 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.
With no associated action to perform, the team moves on to its next script action in the script, if present. If there is no building at the specified waypoint, the TaskForce will attack the ground when reaching in range of the waypoint. Members with C4=yes set will blow up the structure if does not have CanC4=no set. Members that do not have Assaulter=no set will garrison the structure if it has CanBeOccupied=yes set. Members with Agent=yes set will spy on the structure if it has Spyable=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. If any members have Infiltrate=yes set they will enter the structure at the waypoint. This instructs the TeamType to use the TaskForce to attack the waypoint number specified by the second parameter. The following are the target types which can be used:Īnything, , and Īny enemy with Harvester=yes setĪny enemy with a Factory= settingĪny enemy with IsBaseDefense=yes setĪny enemy objects approaching (or already in) its base and which are in an attack missionĪny enemy with positive Power= values setĪny with CanBeOccupied=yes set (usually neutral structures)Īny with NeedsEngineer=yes set (usually NeutralTechBuildings=) Check TargetDistanceCoefficientDefault as it affects the target selection of these script actions. The completion of this script action could get cut-short in cases the task force gets destroyed or runs out of ammo. 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. 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. These attack script actions are inherently self repeating. This instructs the TeamType to use the TaskForce to approach and attack the target specified by the second parameter.