Intelligent Gear WIKI

Forum | Base Ship Commander | Gear Combat Arena

Arena Script Function List

Modified: 2008/03/11 16:29 by ellerbus - Categorized as: Gear Combat Arena
This page will contain the list of Match Variables and Functions and where possible examples of usage for Gear Combat Arena.

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 DescriptionSample CodeExample ReturnUseful 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.@ActionSelectedFalse 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@AttackedByChainguntrue/falseattacked
@AttackedByMine: Whether or not a you were attacked by a mine@AttackedByMinetrue/falseattacked
@AttackedByMortar: Whether or not a you were attacked by a mortar@AttackedByMortartrue/falseattacked
@AttackedDamage: Gets the amount of HP lost during the attack@AttackedDamage0+attacked
@AttackedHeading: Gets the heading from which the attack came from@AttackedHeading0 to 360attacked
@AttackedPosX: Gets the X coordinate from which the attack came from@AttackedPosX@MinX to @MaxXattacked
@AttackedPosY: Gets the Y coordinate from which the attack came from@AttackedPosY@MinY to @MaxYattacked
@ChaingunAimX: Gets the current X coordinate that the chaingun is aimed at@ChaingunAimX@MinX to @MaxXany
@ChaingunAimY: Gets the current Y coordinate that the chaingun is aimed at@ChaingunAimY@MinY to @MaxYany
@ChaingunAmmo: Gets the current amount of ammo available to the chaingun@ChaingunAmmo0 to @ChaingunMaxAmmoany
@ChaingunCluster: Gets the current cluster value of the chaingun@ChaingunCluster0 to @ChaingunMaxClusterany
@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@CloakIsOnTrue if cloak is ONany
@EnemyAppearsDrained: Looking at the Gear it 'appears' that its EP is low@EnemyAppearsDrainedTrue if EP appears lowenemySpotted
@EnemyAppearsWeak: Looking at the Gear it 'appears' that its HP is low@EnemyAppearsWeakTrue if EP appears weakenemySpotted
@EnemyCount: Gets count of total enemy gears that have been scanned@EnemyCount0+enemySpotted
@EnemyDistance: Gets the distance to the enemy gear currently being scanned@EnemyDistance0+enemySpotted
@EnemyHeading: Gets the heading of the enemy gear currently being scanned@EnemyHeading0 to 360enemySpotted
@EnemyId: Gets the ID of the enemy gear currently being scanned@EnemyId0+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 @MaxXenemySpotted
@EnemyPosY: Gets the Y coordinate of the enemy gear currently being scanned@EnemyPosY@MinY to @MaxYenemySpotted
@EnemyScanned: Gets the number of turns the enemy gear currently being scanned has been scanned@EnemyScanned1+enemySpotted
@EP: Gets the current EP available@EP0 to @MaxEPany
@EpRecharge: Gets the EP recharge rate@EpRecharge0+any
@EpToDropMine: Gets the amount EP required to drop a mine@EpToDropMine0+any
@EpToFireChaingun: Gets the amount of EP required to fire the chaingun@EpToFireChaingun0+any
@EpToFireMortar: Gets the amount of EP required to fire the mortar@EpToFireMortar0+any
@EpToFly: Gets the EP required to fly per 1 map unit@EpToFly0+any
@EpToMove: Gets the EP required to move@EpToMove0+any
@EpToRepair: Gets the amount of EP required to repair@EpToRepair0+any
@EpToRun: Gets the EP required to run@EpToRun0+any
@EpToScan: Gets the EP required to scan@EpToScan0+any
@EpToTurn: Gets the EP required to turn 15 degrees@EpToTurn0+any
@EpToUseCloak: Gets the amount of EP required to run the cloak per turn@EpToUseCloak0+any
@EpToUseShields: Gets the amount of EP required to run the shields per turn@EpToUseShields0+any
@GearsInArena: The total count of gears currently in the arena (your gear is included)@GearsInArena1+any
@GearsInMatch: The total count of gears in the current match, use @GearsInArena to determine the number alive@GearsInMatch1+any
@Heading: Gets the current heading@Heading0 to 360any
@HP: Gets the current amount of HP@HP0 to @MaxHPany
@HpRepair: Gets the HP repair rate@HpRepair0+any
@Id: Gets the ID of your gear@Id0+any
@Initiative: The initiative value used to sort the current turn@Initiative0+any
@MaxEP: Gets the maximum amount of EP that can be stored@MaxEP0+any
@MaxFlyDistance: Gets the current maximum flying distance based on current EP@MaxFlyDistance0+any
@MaxHP: Gets the maximum amount of HP that can be stored@MaxHP0+any
@MaxMoveDistance: Gets the current maximum move distance@MaxMoveDistance0+any
@MaxRunDistance: Gets the current maximum run distance@MaxRunDistance0+any
@MaxX: The maximum X coordinate of the map@MaxXtypically 50any
@MaxY: The maximum Y coordinate of the map@MaxYtypically 50any
@MineAmmo: Gets the amount of mines currently available to drop@MineAmmo0 to @MineMaxAmmoany
@MineAOE: Gets area of effect radius for a mine@MineAOE0+any
@MineCluster: Gets the current cluster value of the mortar@MineCluster0 to @MineMaxClusterany
@MineCount: Gets count of total mines that have been scanned@MineCount0+mineSpotted
@MineDelay: Gets the number of ticks currently set for the mine delay@MineDelay0+any
@MineDistance: Gets the distance to the mine currently being scanned@MineDistance0+mineSpotted
@MineMaxAmmo: The maximum amount of ammo that is carried by the mine for a match@MineMaxAmmo0+any
@MineMaxCluster: Gets the maximum cluster value available to the mortar@MineMaxCluster0+any
@MinePosX: Gets the X coordinate of the mine currently being scanned@MinePosX@MinX to @MaxXmineSpotted
@MinePosY: Gets the Y coordinate of the mine currently being scanned@MinePosY@MinY to @MaxYmineSpotted
@MineProximity: Gets the proximity range of a mine@MineProximity0+any
@MinesDetonated: Gets the number of mines that have been detonated@MinesDetonated0+any
@MinesDropped: Gets the amout of mines that have been dropped@MinesDropped0+any
@MinX: The minimum X coordinate of the map@MinX0any
@MinY: The minimum Y coordinate of the map@MinY0any
@MortarAimX: Gets the current X coordinate that the mortar is aimed at@MortarAimX@MinX to @MaxXany
@MortarAimY: Gets the current Y coordinate that the mortar is aimed at@MortarAimY@MinY to @MaxYany
@MortarAmmo: Gets the current amount of ammo available to the mortar@MortarAmmo0 to @MortarMaxAmmoany
@MortarAOE: Gets area of effect radius for the mortar@MortarAOE0+any
@MortarCluster: Gets the current cluster value of the mortar@MortarCluster0 to @MortarMaxClusterany
@MortarMaxAmmo: The maximum amount of ammo that is carried by the mortar for a match@MortarMaxAmmo0+any
@MortarMaxCluster: Gets the maximum cluster value available to the mortar@MortarMaxCluster0+any
@MortarRange: Gets the range of the mortar@MortarRange0+any
@Name: Gets the name of your gear@Name""any
@PosX: Gets the current X coordinate@PosX@MinX to @MaxXany
@PosY: Gets the current Y coordinate@PosY@MinY to @MaxYany
@ScannerOn: Whether or not the scanner is on@ScannerOnTrue if scanner is ONany
@ScanRange: Gets the range of the scanner@ScanRange0+any
@ShieldsAreOn: Whether or not the shields are on@ShieldsAreOnTrue if shields are ONany
@TargetDamage: Gets the amount of HP damaged with an the attack@TargetDamage0+targetHit
@TargetHeading: Gets the heading to the target location@TargetHeading0 to 360targetHit
@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@TargetHitWithChainguntrue/falsetargetHit
@TargetHitWithMine: Whether or not a you attacked with a mine@TargetHitWithMinetrue/falseY
@TargetHitWithMortar: Whether or not a you attacked with a mortar@TargetHitWithMortartrue/falsetargetHit
@TargetId: Gets the Gear ID of the target@TargetId0+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@TargetMissWithChainguntrue/falsetargetMiss
@TargetMissWithMine: Whether or not a you attacked with a mine@TargetMissWithMinetrue/falsetargetMiss
@TargetMissWithMortar: Whether or not a you attacked with a mortar@TargetMissWithMortartrue/falsetargetMiss
@TargetMissX: Gets the X coordinate of the target location@TargetMissX@MinX to @MaxXtargetMiss
@TargetMissY: Gets the Y coordinate of the target location@TargetMissY@MinY to @MaxYtargetMiss
@TargetName: Gets the heading to the target location@TargetName""targetHit
@TargetPosX: Gets the X coordinate of the target location@TargetPosX@MinX to @MaxXtargetHit
@TargetPosY: Gets the Y coordinate of the target location@TargetPosY@MinY to @MaxYtargetHit
@Turn: The current turn of the match@Turn0+any
@TurnsWithoutAction: The current of turns taken without any reasonable action (ie. constant recharging will remove a gear from the arena)@TurnsWithoutAction0 to 15any

System Function DescriptionSample CodeSample ReturnAction Queue
Abs: Gets the absolute value of the given numberAbs(-1)1-
AngleTo: Gets the angle in degrees based on the given x,y coordinates and the Gear's current locationAngleTo(1, 2)0 to 360-
AngleToGear: Gets the distance based on the given Gear ID and the Gear's current locationAngleToGear(@EnemyId)0 to 360-
CanLoadEnemyRef: Whether or not the enemy reference with the desired Gear ID (for @Enemy* variables) can be loadedCanLoadEnemyRef(@EnemyId)true/false-
Ceil: Gets integer ceiling of the given valueCeil(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 locationDistanceTo(1, 2)number-
DistanceToGear: Gets the distance based on the given Gear ID and the Gear's current locationDistanceToGear(@EnemyId)number-
DropMine: Drops a mine at the gear's current coordinatesDropMine()-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 valueFloor(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 ExcelFormatNumber(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 IDGetGearName(@EnemyId)""-
GetTurnsTo: Gets the total number of turns (at 15 degree increments) it would take to face the specified coordinatesGetTurnsTo($x, $y)number-
HasEP: Determines if the Gear has the give value of EPHasEP(34)true/false-
InStr: Gets starting zero based index of a given string and the string to findInStr("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 arenaIsOnMap(23, 45)true/false-
IsValidGearId: Determines if the given ID is a valid Gear ID for the current match and is currently in the matchIsValidGearId($id)true/false-
LCase: Converts a string to lower case lettersLCase("Hello")"hello"-
Left: Gets the left most substring value given a specified lengthLeft("Hello", 1)"H"-
LenStr: Gets the length of the given stringLenStr("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 messageLog("Yo !")--
LogStatus: Log Status information about a GearLogStatus()--
Max: Gets the maximum valueMax(4, 1)4-
Min: Gets the minimum valueMin(4, 1)1-
Mod: Gets the modulus of the given value and its divisorMod(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 battleRecharge()-primary
Repair: Repair the gear's health pods during an arena battleRepair()-primary
Right: Gets the right most substring value given a specified lengthRight("Hello", 1)"o"-
Round: Rounds a value to a desired number of decimal placesRound(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 offScannerOff()--
ScannerOn: Turns the scanner onScannerOn()--
SetChaingunCluster: Sets cluster of the ChaingunSetChaingunCluster(1)--
SetMineCluster: Sets cluster of the MineSetMineCluster(1)--
SetMineDelay: Sets the mine delay mechanism (in terms of ticks)SetMineDelay(1)-primary
SetMortarCluster: Sets cluster of the MortarSetMortarCluster(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 logShoutAll("Hey everyone")--
ShoutAt: Inserts a message into the Gear's private log based on the given IDShoutAt(@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 lengthSubStr("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 valueToBool("false")false-
ToDegrees: Converts the given number to degreesToDegrees(3.14)180-
ToFloat: Converts the given value to a floating point numberToFloat(1)1.0-
ToInt: Converts the given value to an integerToInt(1.2)1-
ToRadians: Converts the given number to radiansToRadians(180)3.14-
ToStr: Converts the given value to a stringToStr("1.23")1.23-
TurnTo: Turn to face the given x,y coordinatesTurnTo($x, $y)--
UCase: Converts a string to upper case lettersUCase("hello")"HELLO"-

ScrewTurn Wiki version 2.0.22. Some of the icons created by FamFamFam.