This page will contain the list of Match Variables and Functions and where possible examples of usage for
.
NOTE: These are being added as time permits and may be incomplete until this is removed
Match Variables
These are variables that begin with the @ symbol and change throughout the match. You cannot change these variables directly, only by doing some action in game will they change.
| System Variable Description | Sample Code | Example Return | Useful Event |
|---|
| @ActionSelected: Whether or not an action has been selected. This system variable is useful in determing whether or not your gear has selected an action to take prior to the myTurn event. | @ActionSelected | False on no action yet. | myTurn |
| @AttackedBy: Gets the name of the weapon that your Gear was attacked with. This can be used to determine whether or not a gear may be within range for retaliation. | @AttackedBy | "CHAINGUN", "MORTAR", "MINE" | attacked |
| @AttackedByChaingun: Whether or not a you were attacked by a chaingun | @AttackedByChaingun | true/false | attacked |
| @AttackedByMine: Whether or not a you were attacked by a mine | @AttackedByMine | true/false | attacked |
| @AttackedByMortar: Whether or not a you were attacked by a mortar | @AttackedByMortar | true/false | attacked |
| @AttackedDamage: Gets the amount of HP lost during the attack | @AttackedDamage | 0+ | attacked |
| @AttackedHeading: Gets the heading from which the attack came from | @AttackedHeading | 0 to 360 | attacked |
| @AttackedPosX: Gets the X coordinate from which the attack came from | @AttackedPosX | @MinX to @MaxX | attacked |
| @AttackedPosY: Gets the Y coordinate from which the attack came from | @AttackedPosY | @MinY to @MaxY | attacked |
| @ChaingunAimX: Gets the current X coordinate that the chaingun is aimed at | @ChaingunAimX | @MinX to @MaxX | any |
| @ChaingunAimY: Gets the current Y coordinate that the chaingun is aimed at | @ChaingunAimY | @MinY to @MaxY | any |
| @ChaingunAmmo: Gets the current amount of ammo available to the chaingun | @ChaingunAmmo | 0 to @ChaingunMaxAmmo | any |
| @ChaingunCluster: Gets the current cluster value of the chaingun | @ChaingunCluster | 0 to @ChaingunMaxCluster | any |
| @ChaingunMaxAmmo: The maximum amount of ammo that is carried by the chaingun for a match | @ChaingunMaxAmmo | - | any |
| @ChaingunMaxCluster: Gets the maximum cluster value available to the chaingun | @ChaingunMaxCluster | - | any |
| @ChaingunRange: Gets the range of the chaingun | @ChaingunRange | - | any |
| @CloakIsOn: Whether or not the cloak is on | @CloakIsOn | True if cloak is ON | any |
| @EnemyAppearsDrained: Looking at the Gear it 'appears' that its EP is low | @EnemyAppearsDrained | True if EP appears low | enemySpotted |
| @EnemyAppearsWeak: Looking at the Gear it 'appears' that its HP is low | @EnemyAppearsWeak | True if EP appears weak | enemySpotted |
| @EnemyCount: Gets count of total enemy gears that have been scanned | @EnemyCount | 0+ | enemySpotted |
| @EnemyDistance: Gets the distance to the enemy gear currently being scanned | @EnemyDistance | 0+ | enemySpotted |
| @EnemyHeading: Gets the heading of the enemy gear currently being scanned | @EnemyHeading | 0 to 360 | enemySpotted |
| @EnemyId: Gets the ID of the enemy gear currently being scanned | @EnemyId | 0+ | enemySpotted |
| @EnemyName: Gets the name of the enemy gear currently being scanned | @EnemyName | - | enemySpotted |
| @EnemyPosX: Gets the X coordinate of the enemy gear currently being scanned | @EnemyPosX | @MinX to @MaxX | enemySpotted |
| @EnemyPosY: Gets the Y coordinate of the enemy gear currently being scanned | @EnemyPosY | @MinY to @MaxY | enemySpotted |
| @EnemyScanned: Gets the number of turns the enemy gear currently being scanned has been scanned | @EnemyScanned | 1+ | enemySpotted |
| @EP: Gets the current EP available | @EP | 0 to @MaxEP | any |
| @EpRecharge: Gets the EP recharge rate | @EpRecharge | 0+ | any |
| @EpToDropMine: Gets the amount EP required to drop a mine | @EpToDropMine | 0+ | any |
| @EpToFireChaingun: Gets the amount of EP required to fire the chaingun | @EpToFireChaingun | 0+ | any |
| @EpToFireMortar: Gets the amount of EP required to fire the mortar | @EpToFireMortar | 0+ | any |
| @EpToFly: Gets the EP required to fly per 1 map unit | @EpToFly | 0+ | any |
| @EpToMove: Gets the EP required to move | @EpToMove | 0+ | any |
| @EpToRepair: Gets the amount of EP required to repair | @EpToRepair | 0+ | any |
| @EpToRun: Gets the EP required to run | @EpToRun | 0+ | any |
| @EpToScan: Gets the EP required to scan | @EpToScan | 0+ | any |
| @EpToTurn: Gets the EP required to turn 15 degrees | @EpToTurn | 0+ | any |
| @EpToUseCloak: Gets the amount of EP required to run the cloak per turn | @EpToUseCloak | 0+ | any |
| @EpToUseShields: Gets the amount of EP required to run the shields per turn | @EpToUseShields | 0+ | any |
| @GearsInArena: The total count of gears currently in the arena (your gear is included) | @GearsInArena | 1+ | any |
| @GearsInMatch: The total count of gears in the current match, use @GearsInArena to determine the number alive | @GearsInMatch | 1+ | any |
| @Heading: Gets the current heading | @Heading | 0 to 360 | any |
| @HP: Gets the current amount of HP | @HP | 0 to @MaxHP | any |
| @HpRepair: Gets the HP repair rate | @HpRepair | 0+ | any |
| @Id: Gets the ID of your gear | @Id | 0+ | any |
| @Initiative: The initiative value used to sort the current turn | @Initiative | 0+ | any |
| @MaxEP: Gets the maximum amount of EP that can be stored | @MaxEP | 0+ | any |
| @MaxFlyDistance: Gets the current maximum flying distance based on current EP | @MaxFlyDistance | 0+ | any |
| @MaxHP: Gets the maximum amount of HP that can be stored | @MaxHP | 0+ | any |
| @MaxMoveDistance: Gets the current maximum move distance | @MaxMoveDistance | 0+ | any |
| @MaxRunDistance: Gets the current maximum run distance | @MaxRunDistance | 0+ | any |
| @MaxX: The maximum X coordinate of the map | @MaxX | typically 50 | any |
| @MaxY: The maximum Y coordinate of the map | @MaxY | typically 50 | any |
| @MineAmmo: Gets the amount of mines currently available to drop | @MineAmmo | 0 to @MineMaxAmmo | any |
| @MineAOE: Gets area of effect radius for a mine | @MineAOE | 0+ | any |
| @MineCluster: Gets the current cluster value of the mortar | @MineCluster | 0 to @MineMaxCluster | any |
| @MineCount: Gets count of total mines that have been scanned | @MineCount | 0+ | mineSpotted |
| @MineDelay: Gets the number of ticks currently set for the mine delay | @MineDelay | 0+ | any |
| @MineDistance: Gets the distance to the mine currently being scanned | @MineDistance | 0+ | mineSpotted |
| @MineMaxAmmo: The maximum amount of ammo that is carried by the mine for a match | @MineMaxAmmo | 0+ | any |
| @MineMaxCluster: Gets the maximum cluster value available to the mortar | @MineMaxCluster | 0+ | any |
| @MinePosX: Gets the X coordinate of the mine currently being scanned | @MinePosX | @MinX to @MaxX | mineSpotted |
| @MinePosY: Gets the Y coordinate of the mine currently being scanned | @MinePosY | @MinY to @MaxY | mineSpotted |
| @MineProximity: Gets the proximity range of a mine | @MineProximity | 0+ | any |
| @MinesDetonated: Gets the number of mines that have been detonated | @MinesDetonated | 0+ | any |
| @MinesDropped: Gets the amout of mines that have been dropped | @MinesDropped | 0+ | any |
| @MinX: The minimum X coordinate of the map | @MinX | 0 | any |
| @MinY: The minimum Y coordinate of the map | @MinY | 0 | any |
| @MortarAimX: Gets the current X coordinate that the mortar is aimed at | @MortarAimX | @MinX to @MaxX | any |
| @MortarAimY: Gets the current Y coordinate that the mortar is aimed at | @MortarAimY | @MinY to @MaxY | any |
| @MortarAmmo: Gets the current amount of ammo available to the mortar | @MortarAmmo | 0 to @MortarMaxAmmo | any |
| @MortarAOE: Gets area of effect radius for the mortar | @MortarAOE | 0+ | any |
| @MortarCluster: Gets the current cluster value of the mortar | @MortarCluster | 0 to @MortarMaxCluster | any |
| @MortarMaxAmmo: The maximum amount of ammo that is carried by the mortar for a match | @MortarMaxAmmo | 0+ | any |
| @MortarMaxCluster: Gets the maximum cluster value available to the mortar | @MortarMaxCluster | 0+ | any |
| @MortarRange: Gets the range of the mortar | @MortarRange | 0+ | any |
| @Name: Gets the name of your gear | @Name | "" | any |
| @PosX: Gets the current X coordinate | @PosX | @MinX to @MaxX | any |
| @PosY: Gets the current Y coordinate | @PosY | @MinY to @MaxY | any |
| @ScannerOn: Whether or not the scanner is on | @ScannerOn | True if scanner is ON | any |
| @ScanRange: Gets the range of the scanner | @ScanRange | 0+ | any |
| @ShieldsAreOn: Whether or not the shields are on | @ShieldsAreOn | True if shields are ON | any |
| @TargetDamage: Gets the amount of HP damaged with an the attack | @TargetDamage | 0+ | targetHit |
| @TargetHeading: Gets the heading to the target location | @TargetHeading | 0 to 360 | targetHit |
| @TargetHitWith: Gets the name of the weapon that you attacked the Gear with | @TargetHitWith | "CHAINGUN", "MORTAR", "MINE" | targetHit |
| @TargetHitWithChaingun: Whether or not a you attacked with a chaingun | @TargetHitWithChaingun | true/false | targetHit |
| @TargetHitWithMine: Whether or not a you attacked with a mine | @TargetHitWithMine | true/false | Y |
| @TargetHitWithMortar: Whether or not a you attacked with a mortar | @TargetHitWithMortar | true/false | targetHit |
| @TargetId: Gets the Gear ID of the target | @TargetId | 0+ | targetHit |
| @TargetMissWith: Gets the name of the weapon that you attacked the Gear with | @TargetMissWith | "CHAINGUN", "MORTAR", "MINE" | targetMiss |
| @TargetMissWithChaingun: Whether or not a you attacked with a chaingun | @TargetMissWithChaingun | true/false | targetMiss |
| @TargetMissWithMine: Whether or not a you attacked with a mine | @TargetMissWithMine | true/false | targetMiss |
| @TargetMissWithMortar: Whether or not a you attacked with a mortar | @TargetMissWithMortar | true/false | targetMiss |
| @TargetMissX: Gets the X coordinate of the target location | @TargetMissX | @MinX to @MaxX | targetMiss |
| @TargetMissY: Gets the Y coordinate of the target location | @TargetMissY | @MinY to @MaxY | targetMiss |
| @TargetName: Gets the heading to the target location | @TargetName | "" | targetHit |
| @TargetPosX: Gets the X coordinate of the target location | @TargetPosX | @MinX to @MaxX | targetHit |
| @TargetPosY: Gets the Y coordinate of the target location | @TargetPosY | @MinY to @MaxY | targetHit |
| @Turn: The current turn of the match | @Turn | 0+ | any |
| @TurnsWithoutAction: The current of turns taken without any reasonable action (ie. constant recharging will remove a gear from the arena) | @TurnsWithoutAction | 0 to 15 | any |
| System Function Description | Sample Code | Sample Return | Action Queue |
|---|
| Abs: Gets the absolute value of the given number | Abs(-1) | 1 | - |
| AngleTo: Gets the angle in degrees based on the given x,y coordinates and the Gear's current location | AngleTo(1, 2) | 0 to 360 | - |
| AngleToGear: Gets the distance based on the given Gear ID and the Gear's current location | AngleToGear(@EnemyId) | 0 to 360 | - |
| CanLoadEnemyRef: Whether or not the enemy reference with the desired Gear ID (for @Enemy* variables) can be loaded | CanLoadEnemyRef(@EnemyId) | true/false | - |
| Ceil: Gets integer ceiling of the given value | Ceil(1.2) | 2 | - |
| CloakOff: Lower the gear's cloak (turn off) | CloakOff() | - | secondary |
| CloakOn: Raise the gear's cloak (turn on) | CloakOn() | - | secondary |
| Cos: Gets the cosine value of the given angle (in radians) | Cos(3.14) | -1 | - |
| DistanceTo: Gets the distance based on the given x,y coordinates and the Gear's current location | DistanceTo(1, 2) | number | - |
| DistanceToGear: Gets the distance based on the given Gear ID and the Gear's current location | DistanceToGear(@EnemyId) | number | - |
| DropMine: Drops a mine at the gear's current coordinates | DropMine() | - | primary |
| FireChaingunAt: Fire the chaingun at the given x,y coordinates (sample: FireMortarAt($x, $y)) | FireChaingunAt(1, 3) | - | primary |
| FireChaingunAtGear: Fire the chaingun at the coordinates of the specified gear (sample: FireMortarAtGear($gearId)) | FireChaingunAtGear(@EnemyId) | - | primary |
| FireMortarAt: Fire the mortar at the given x,y coordinates (sample: FireMortarAt($x, $y)) | FireMortarAt(23, 45) | - | primary |
| FireMortarAtGear: Fire the mortar at the coordinates of the specified gear (sample: FireMortarAtGear($gearId)) | FireMortarAtGear(@EnemyId) | - | primary |
| Floor: Gets integer floor of the given value | Floor(1.2) | 1 | - |
| FlyTo: Fly to the given x,y coordinates (sample: FlyTo($x, $y)) | FlyTo(2, 34) | - | primary |
| FlyToGear: Fly to the coordinates of the specified gear (sample: FlyToGear($gearId)) | FlyToGear(@EnemyId) | - | primary |
| FormatNumber: Formats the given value based on the formats similar to Excel | FormatNumber(2.3, "{0.00}") | 2.30 | - |
| GetAngle: Gets the angle in degrees between two coordinates (x1,y1,x2,y2) | GetAngle($x1, $y1, $x2, $y2) | number | - |
| GetDistance: Gets the distance between two coordinates (x1,y1,x2,y2) | GetDistance($x1, $y1, $x2, $y2) | number | - |
| GetGearIdAt: Gets the Gear ID given a set of x,y coordinates (provdied the Gear can be seen by the scanner) | GetGearIdAt(34, 23) | number | - |
| GetGearName: Gets the Gear Name given an ID | GetGearName(@EnemyId) | "" | - |
| GetTurnsTo: Gets the total number of turns (at 15 degree increments) it would take to face the specified coordinates | GetTurnsTo($x, $y) | number | - |
| HasEP: Determines if the Gear has the give value of EP | HasEP(34) | true/false | - |
| InStr: Gets starting zero based index of a given string and the string to find | InStr("hello", "h") | 0 | - |
| IsEnemyAt: Determines if an enemy is at the given set of cooridnates (provided it can be seen by the scanner) | IsEnemyAt(23, 45) | true/false | - |
| IsGearAt: Determines if the given x,y coordinates contain a Gear (provdied the Gear can be seen by the scanner) | IsGearAt(23, 45) | true/false | - |
| IsMineAt: Determines if a mine is at the given set of cooridnates (provided it can be seen by the scanner) | IsMineAt(23, 45) | true/false | - |
| IsOnMap: Gets whether or not the given x,y coordinates exist in the arena | IsOnMap(23, 45) | true/false | - |
| IsValidGearId: Determines if the given ID is a valid Gear ID for the current match and is currently in the match | IsValidGearId($id) | true/false | - |
| LCase: Converts a string to lower case letters | LCase("Hello") | "hello" | - |
| Left: Gets the left most substring value given a specified length | Left("Hello", 1) | "H" | - |
| LenStr: Gets the length of the given string | LenStr("ABC") | 3 | - |
| LoadEnemyRef: Load the enemy reference with the desired Gear ID (for @Enemy* variables) | LoadEnemyRef(a) | - | - |
| LoadNearestEnemyRef: Load the enemy reference that is closest to the Gear's coordinates (for @Enemy* variables) | LoadNearestEnemyRef() | - | - |
| Log: Log the given value as a DEBUG log message | Log("Yo !") | - | - |
| LogStatus: Log Status information about a Gear | LogStatus() | - | - |
| Max: Gets the maximum value | Max(4, 1) | 4 | - |
| Min: Gets the minimum value | Min(4, 1) | 1 | - |
| Mod: Gets the modulus of the given value and its divisor | Mod(12, 2) | 0 | - |
| MoveTo: Move to the specified coordinates (sample: MoveTo($x, $y)) | MoveTo(23, 45) | - | primary |
| MoveToGear: Move to the coordinates of the specified gear (sample: MoveToGear($gearId)) | MoveToGear($id) | - | primary |
| PositionIs: Whether or NOT the gear is at the specified coordinates (sample: PositionIs($x, $y)) | PositionIs(23, 7) | true/false | - |
| Rand: Gets a random value between a lo and hi value (both inputs are inclusive) | Rand(1, 10) | between 1 and 10 | - |
| Recharge: Recharge the gear's energy points (EP) during an arena battle | Recharge() | - | primary |
| Repair: Repair the gear's health pods during an arena battle | Repair() | - | primary |
| Right: Gets the right most substring value given a specified length | Right("Hello", 1) | "o" | - |
| Round: Rounds a value to a desired number of decimal places | Round(1.23, 1) | 1.2 | - |
| RunTo: Run to the given x,y coordinates (sample: RunTo($x, $y)) | RunTo(3, 4) | - | primary |
| RunToGear: Run to the coordinates of the specified gear (sample: RunToGear($gearId)) | RunToGear(@EnemyId) | - | primary |
| ScannerOff: Turns the scanner off | ScannerOff() | - | - |
| ScannerOn: Turns the scanner on | ScannerOn() | - | - |
| SetChaingunCluster: Sets cluster of the Chaingun | SetChaingunCluster(1) | - | - |
| SetMineCluster: Sets cluster of the Mine | SetMineCluster(1) | - | - |
| SetMineDelay: Sets the mine delay mechanism (in terms of ticks) | SetMineDelay(1) | - | primary |
| SetMortarCluster: Sets cluster of the Mortar | SetMortarCluster(1) | - | - |
| ShieldsOff: Lower the gear's shields (turn off) | ShieldsOff() | - | secondary |
| ShieldsOn: Raise the gear's shields (turn on) | ShieldsOn() | - | secondary |
| ShoutAll: Inserts a message into all Gear's private log | ShoutAll("Hey everyone") | - | - |
| ShoutAt: Inserts a message into the Gear's private log based on the given ID | ShoutAt(@EnemyId, "Watch out") | - | - |
| Sin: Gets the sine value of the given angle (in radians) | Sin(3.14) | 0 | - |
| SubStr: Gets a substring value given its start position of zero based index and the desired length | SubStr("Hello", 1, 2) | "el" | - |
| Tan: Gets the tangent value of the given angle (in radians) | Tan(3.14) | - | - |
| ToBool: Converts the given value to a boolean value | ToBool("false") | false | - |
| ToDegrees: Converts the given number to degrees | ToDegrees(3.14) | 180 | - |
| ToFloat: Converts the given value to a floating point number | ToFloat(1) | 1.0 | - |
| ToInt: Converts the given value to an integer | ToInt(1.2) | 1 | - |
| ToRadians: Converts the given number to radians | ToRadians(180) | 3.14 | - |
| ToStr: Converts the given value to a string | ToStr("1.23") | 1.23 | - |
| TurnTo: Turn to face the given x,y coordinates | TurnTo($x, $y) | - | - |
| UCase: Converts a string to upper case letters | UCase("hello") | "HELLO" | - |