|
Tiberian Technologies Scripts Reference Revision: 9000
|
Conquest Mode - Control Zone. More...
#include <dp88_misc.h>
Protected Member Functions | |
| void | ChangeOwner (GameObject *pObj, int team) |
Protected Attributes | |
| int | m_controllerID |
| int | m_zoneID |
| float | m_captureState |
| bool | m_bTickRunning |
Cached Script Parameters | |
Attach this script to an object to create a conquest control zone around or near that object. A control zone can be taken over by a team if one or more players from that team are standing in the zone with no enemy players. A zone can grant conquest points to a team upon it's initial capture and continually for as long as they control the zone. Requires a controller object to be placed on the map with the dp88_conquestController script attached to it before this script can work.
If the zone is currently neutral it takes CaptureTime seconds for one player to take control of the zone for their team. If the zone is currently owned by the enemy team it takes CaptureTime seconds for one player to make the zone neutral, after which they can take control of the zone as normal.
Additional units can contribute to the capturing process to reduce the time required to take control of the zone, up to MultiCaptureCap. Any additional players in the zone beyond the maximum cap will not provide any additional boost to the capture speed. Note that the cap is the total number of units, including the first unit to enter the zone, so a cap of 1 will disable the ability to boost capture speeds.
Each additional player within the cap, beyond the first player, will reduce the capture time by (CaptureTime*MultiCaptureMultiplier) seconds, thus with a multipler of 0.5 each additional player will reduce the capture time by half of the original time.
If AllowMajorityCapture is enabled the zone can be captured whilst there are enemy players in the zone by the team which has the most players in the zone. If combined with a MultiCaptureCap >1 each enemy player in the zone nullifies the effect of one of the majority teams players, reducing the capture speed boost. Thus, with 5 players on the majority team and 3 players on the minority team in the zone the capture speed will be 50% of the original time, rather than the 20% it would be if there were no enemy team players in the zone (assuming a MultiCaptureMultiplier of 1.0).
An animation can be played on the object upon which the script is attached to indicate the current state of the control zone, which consists of a single frame for each of the three fixed states (team0 controlled, neutral, team1 controlled) and optionally a series of intermediate transition frames which will be used to indicate how close the zone is to being captured or returned to its neutral state. You could attach other animated objects to the animation using bones if a continual animation is required, such as a waving flag that moves up and down a flagpole during capture.
If the zone is partially captured and there is no longer anybody in the zone it will slowly revert to its previous state, losing 1 second of capture progress per second.
| ZoneSize | The size of the capture zone to be created |
| ZoneOffset | Optional. The offset from the object location the zone should be centered upon |
| ZonePreset | The preset to use for the capture zone, this does not require any scripts to be attached |
| CapturePoints | The number of points to give to a team when they take control of the zone from neutral. If the control point spawns as non-neutral no points will be given to the initial team |
| CapturePointsFirstTeamOnly | Determines if CapturePoints are every time a team takes control of a zone or if they are only given the first time the zone is taken over from neutral. 1 to enable, 0 to disable |
| TickPoints | Conquest points to give to the team which currently owns the zone every 'TickInterval' seconds |
| TickInterval | Tick interval, in seconds, at which to give conquest points to the zones current owner |
| CaptureTime | Time, in seconds, required to take control of the zone from neutral or restore the zone to the neutral state from enemy control |
| MultiCaptureCap | The maximum number of units that can contribute to speeding up the capture process. If set to 1 or 0 multi capture will be disabled. See the class description for more information |
| MultiCaptureMultiplier | The multipler to be applied to the capture speed by each additional unit, up to the specified cap, where 1.0 gives a 100% boost to the capture speed and 0.5 gives a 50% boost. See the class description for more information |
| AllowMajorityCapture | Allow a zone to be captured by the team with more players in the zone, even if enemy players are also in the zone. See the class description for more information. 1 to enable, 0 to disable |
| CaptureAnim | Optional. The name of an animation to play on the object to indicate capture progress. This animation should be in the following order: (team0 controlled) -> (team0<->neutral transition) -> (neutral) -> (neutral<->team1 transition) -> (team1 controlled). The controlled and neutral states should be a single frame. The transitions are optional, but if present must contain the same number of frames |
| CaptureAnimTransitionFrames | The number of transition frames between the controlled and neutral states in the CaptureAnim, or zero if there are no transition frames |
| CapturingString | Optional. The name of a strings database entry containing a message to be displayed to the team which currently controls the zone when the enemy team are capturing it. See the note below for a list of macros you can use in this string |
| NeutralString | Optional. The name of a strings database entry containing a message to be displayed to all players when a capture zone becomes neutral. See the note below for a list of macros you can use in this string |
| CapturedString | Optional. The name of a strings database entry containing a message to be displayed to all players when a team takes control of a capture zone. See the note below for a list of macros you can use in this string |
| AIObjective_Priority_Soldier | Optional. AI objective priority for soldiers. See notes below for more details. |
| AIObjective_Priority_Light_Vehicle | Optional. AI objective priority for light vehicles. See notes below for more details. |
| AIObjective_Priority_Heavy_Vehicle | Optional. AI objective priority for heavy vehicles. See notes below for more details. |
| AIObjective_Priority_Aircraft | Optional. AI objective priority for aircraft. See notes below for more details. |
| Macro | Value |
|---|---|
| %OWNINGTEAM% | Translated name of the team which controls (or controlled) the zone |
| %OTHERTEAM% | Translated name of the other team |
| %CAPTUREPOINTS% | The value of CapturePoints |
| %TICKPOINTS% | The value of TickPoints |
| %TICKINTERVAL% | The value of TickInterval |
| %ZONENAME% | The translated name of the object this script is attached to |
|
protected |
This function is called when the zone has been captured or made neutral
|
protected |
True if the tick timer is currently running, false otherwise
|
protected |
Current capture progress. 0 = neutral, negative = team0, positive = team1
|
protected |
ID of the GameObject with the controller script attached
|
protected |
ID of the control zone GameObject