


<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://bitfighter.org/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://bitfighter.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=UnknownJoe</id>
		<title>Bitfighter - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://bitfighter.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=UnknownJoe"/>
		<link rel="alternate" type="text/html" href="http://bitfighter.org/wiki/index.php/Special:Contributions/UnknownJoe"/>
		<updated>2026-11-29T20:17:33Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.15</generator>

	<entry>
		<id>http://bitfighter.org/wiki/index.php/Ideas_for_triggers</id>
		<title>Ideas for triggers</title>
		<link rel="alternate" type="text/html" href="http://bitfighter.org/wiki/index.php/Ideas_for_triggers"/>
				<updated>2010-04-10T23:40:07Z</updated>
		
		<summary type="html">&lt;p&gt;UnknownJoe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A working list of ideas for triggers that could cause execution of code in a robot or supervisor script.  Remember that robots are a kind of ship, so, generally, there's no need differentiate the two.&lt;br /&gt;
&lt;br /&gt;
//Unknown: Would this be easier do to with functions that return booleans rather than a bunch of events?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onLevelStart()  // Called after level is loaded and is ready to go.&lt;br /&gt;
onTick()        // Called every frame&lt;br /&gt;
&lt;br /&gt;
// Here, zone could be any polygonal entity: loadout zones, nexus, goal zones, etc.&lt;br /&gt;
onShipEnteredZone(ship, zone) &lt;br /&gt;
onShipLeftZone(ship, zone)&lt;br /&gt;
&lt;br /&gt;
onFlagGrabbed(flag, ship)&lt;br /&gt;
onFlagDropped(flag, dropper)&lt;br /&gt;
&lt;br /&gt;
onShipAboutToSpawn(ship)        // Called just before player spawns&lt;br /&gt;
onShipSpawned(ship)             // Called just after player spawns&lt;br /&gt;
onShipDamaged(ship, damager)&lt;br /&gt;
onShipKilled(ship, killer)&lt;br /&gt;
onShipFiring(ship, weapon, bullet)  &lt;br /&gt;
onShipUsingModule(ship, module)&lt;br /&gt;
&lt;br /&gt;
onPlayerAboutToJoinGame(ship)   // Called just before player joins&lt;br /&gt;
onPlayerJoinedGame(ship)        // Called just after player joins&lt;br /&gt;
onPlayerQuitGame(ship)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
onTurretKilled(turret, killer)&lt;br /&gt;
onAllTurretsKilled(team)&lt;br /&gt;
onForceFieldKilled(forcefield, killer)&lt;br /&gt;
onAllForceFieldKilled(team)&lt;br /&gt;
&lt;br /&gt;
onTeamScored(team, score, scoringEvent, scoringShip)&lt;br /&gt;
onIndividualScored(scoringShip, score, scoringEvent)&lt;br /&gt;
onLeadingTeamChanged(team, previousLeadingTeam)&lt;br /&gt;
onLeadingPlayerChanged(player, previousLeadingPlayer)&lt;br /&gt;
&lt;br /&gt;
onAsteroidSpawned(asteroid)&lt;br /&gt;
onAsteroidShot(asteroid, shooter)&lt;br /&gt;
onAsteroidDestroyed(asteroid, shooter)&lt;br /&gt;
&lt;br /&gt;
onHealthPackUsed(healthpack, ship)&lt;br /&gt;
onHealthPackReplenished(healthpack)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
onTurretSelectedTarget(turret, target)&lt;br /&gt;
onTurretFired(turret, target)&lt;br /&gt;
&lt;br /&gt;
// Game specific events: named on&amp;lt;Game&amp;gt;EventName&lt;br /&gt;
&lt;br /&gt;
onNexusOpen(nexus)&lt;br /&gt;
onNexusClose(nexus)&lt;br /&gt;
onNexusFlagCollected(flag, ship)&lt;br /&gt;
&lt;br /&gt;
onRabbitKilled(rabbit, killer)&lt;br /&gt;
onRabbitGrabbedFlag(rabbit)&lt;br /&gt;
&lt;br /&gt;
onZoneControlZoneCaptured(zone, capturer)&lt;br /&gt;
onZoneControlTouchDownScored(scoringShip) ( or onZonesReset() )&lt;br /&gt;
&lt;br /&gt;
onHTFFlagReturnedToZone(flag, zone, returner)&lt;br /&gt;
onHTFFlagRemovedFromZone(flag, zone, taker)&lt;br /&gt;
&lt;br /&gt;
onSoccerBallPossesionChanged(ball, possessingShip, previousPossesser)&lt;br /&gt;
onSoccerGoalScored(ball, goal, scorer)&lt;br /&gt;
onSoccerBallReset(ball) (when ball actually arrives back at starting position)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//Section by Unknown&lt;br /&gt;
//This is all about what supervisors might be able to do -&lt;br /&gt;
//I misunderstood the title of this section.&lt;br /&gt;
&lt;br /&gt;
//Drawing functions&lt;br /&gt;
drawSetColor(col) //col is a hex uint - 0xFFFF00 is yellow&lt;br /&gt;
drawSetAlpha(amount) //amount is a value 0-1&lt;br /&gt;
drawMove(x,y) //moves the pen to the specified position&lt;br /&gt;
drawLine(x,y) //draws a line from the pen's current position to the &lt;br /&gt;
              //specified position&lt;br /&gt;
drawRectangle(x1,y1,x2,y2)&lt;br /&gt;
drawCircle(x,y,r)&lt;br /&gt;
drawEllipse(x1,y1,x2,y2)&lt;br /&gt;
&lt;br /&gt;
//Functions that modify the game objects&lt;br /&gt;
removeObject(object || marker)&lt;br /&gt;
addObject(levelLine || (object, objectArgs))&lt;br /&gt;
translateObject(object || marker, x, y)&lt;br /&gt;
rotateObject(object || marker, x, y, amount)&lt;br /&gt;
flipObject(object || marker, vertically) //vertically is a boolean that &lt;br /&gt;
                          //determines which direction it is flipped in&lt;br /&gt;
&lt;br /&gt;
//Functions that modify the ship's properties&lt;br /&gt;
Ship:teleport(x,y)&lt;br /&gt;
Ship:setVelocity(x,y)&lt;br /&gt;
Ship:x()&lt;br /&gt;
Ship:y()&lt;br /&gt;
Ship:xSpeed()&lt;br /&gt;
Ship:ySpeed()&lt;br /&gt;
Ship:setEnergy(amount)&lt;br /&gt;
Ship:getEnergy()&lt;br /&gt;
Ship:setHealth(amount)&lt;br /&gt;
Ship:getHealth()&lt;br /&gt;
Ship:setMaxSpeed(maxSpeed)&lt;br /&gt;
Ship:getMaxSpeed()&lt;br /&gt;
Ship:setMaxBoostSpeed(maxSpeed)&lt;br /&gt;
Ship:getMaxBoostSpeed()&lt;br /&gt;
Ship:setFriction(amount)&lt;br /&gt;
Ship:getFriction()&lt;br /&gt;
Ship:destroyShip() //may not be necessary because setShipHealth(0) &lt;br /&gt;
                  //could be used&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>UnknownJoe</name></author>	</entry>

	<entry>
		<id>http://bitfighter.org/wiki/index.php/Ideas_for_triggers</id>
		<title>Ideas for triggers</title>
		<link rel="alternate" type="text/html" href="http://bitfighter.org/wiki/index.php/Ideas_for_triggers"/>
				<updated>2010-04-10T23:38:09Z</updated>
		
		<summary type="html">&lt;p&gt;UnknownJoe: Added more function ideas for ships&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A working list of ideas for triggers that could cause execution of code in a robot or supervisor script.  Remember that robots are a kind of ship, so, generally, there's no need differentiate the two.&lt;br /&gt;
&lt;br /&gt;
//Unknown: Would this be easier do to with functions that return booleans rather than a bunch of events?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onLevelStart()  // Called after level is loaded and is ready to go.&lt;br /&gt;
onTick()        // Called every frame&lt;br /&gt;
&lt;br /&gt;
// Here, zone could be any polygonal entity: loadout zones, nexus, goal zones, etc.&lt;br /&gt;
onShipEnteredZone(ship, zone) &lt;br /&gt;
onShipLeftZone(ship, zone)&lt;br /&gt;
&lt;br /&gt;
onFlagGrabbed(flag, ship)&lt;br /&gt;
onFlagDropped(flag, dropper)&lt;br /&gt;
&lt;br /&gt;
onShipAboutToSpawn(ship)        // Called just before player spawns&lt;br /&gt;
onShipSpawned(ship)             // Called just after player spawns&lt;br /&gt;
onShipDamaged(ship, damager)&lt;br /&gt;
onShipKilled(ship, killer)&lt;br /&gt;
onShipFiring(ship, weapon, bullet)  &lt;br /&gt;
onShipUsingModule(ship, module)&lt;br /&gt;
&lt;br /&gt;
onPlayerAboutToJoinGame(ship)   // Called just before player joins&lt;br /&gt;
onPlayerJoinedGame(ship)        // Called just after player joins&lt;br /&gt;
onPlayerQuitGame(ship)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
onTurretKilled(turret, killer)&lt;br /&gt;
onAllTurretsKilled(team)&lt;br /&gt;
onForceFieldKilled(forcefield, killer)&lt;br /&gt;
onAllForceFieldKilled(team)&lt;br /&gt;
&lt;br /&gt;
onTeamScored(team, score, scoringEvent, scoringShip)&lt;br /&gt;
onIndividualScored(scoringShip, score, scoringEvent)&lt;br /&gt;
onLeadingTeamChanged(team, previousLeadingTeam)&lt;br /&gt;
onLeadingPlayerChanged(player, previousLeadingPlayer)&lt;br /&gt;
&lt;br /&gt;
onAsteroidSpawned(asteroid)&lt;br /&gt;
onAsteroidShot(asteroid, shooter)&lt;br /&gt;
onAsteroidDestroyed(asteroid, shooter)&lt;br /&gt;
&lt;br /&gt;
onHealthPackUsed(healthpack, ship)&lt;br /&gt;
onHealthPackReplenished(healthpack)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
onTurretSelectedTarget(turret, target)&lt;br /&gt;
onTurretFired(turret, target)&lt;br /&gt;
&lt;br /&gt;
// Game specific events: named on&amp;lt;Game&amp;gt;EventName&lt;br /&gt;
&lt;br /&gt;
onNexusOpen(nexus)&lt;br /&gt;
onNexusClose(nexus)&lt;br /&gt;
onNexusFlagCollected(flag, ship)&lt;br /&gt;
&lt;br /&gt;
onRabbitKilled(rabbit, killer)&lt;br /&gt;
onRabbitGrabbedFlag(rabbit)&lt;br /&gt;
&lt;br /&gt;
onZoneControlZoneCaptured(zone, capturer)&lt;br /&gt;
onZoneControlTouchDownScored(scoringShip) ( or onZonesReset() )&lt;br /&gt;
&lt;br /&gt;
onHTFFlagReturnedToZone(flag, zone, returner)&lt;br /&gt;
onHTFFlagRemovedFromZone(flag, zone, taker)&lt;br /&gt;
&lt;br /&gt;
onSoccerBallPossesionChanged(ball, possessingShip, previousPossesser)&lt;br /&gt;
onSoccerGoalScored(ball, goal, scorer)&lt;br /&gt;
onSoccerBallReset(ball) (when ball actually arrives back at starting position)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//Section by Unknown&lt;br /&gt;
//Drawing functions&lt;br /&gt;
drawSetColor(col) //col is a hex uint - 0xFFFF00 is yellow&lt;br /&gt;
drawSetAlpha(amount) //amount is a value 0-1&lt;br /&gt;
drawMove(x,y) //moves the pen to the specified position&lt;br /&gt;
drawLine(x,y) //draws a line from the pen's current position to the &lt;br /&gt;
              //specified position&lt;br /&gt;
drawRectangle(x1,y1,x2,y2)&lt;br /&gt;
drawCircle(x,y,r)&lt;br /&gt;
drawEllipse(x1,y1,x2,y2)&lt;br /&gt;
&lt;br /&gt;
//Functions that modify the game objects&lt;br /&gt;
removeObject(object || marker)&lt;br /&gt;
addObject(levelLine || (object, objectArgs))&lt;br /&gt;
translateObject(object || marker, x, y)&lt;br /&gt;
rotateObject(object || marker, x, y, amount)&lt;br /&gt;
flipObject(object || marker, vertically) //vertically is a boolean that &lt;br /&gt;
                          //determines which direction it is flipped in&lt;br /&gt;
&lt;br /&gt;
//Functions that modify the ship's properties&lt;br /&gt;
Ship:teleport(x,y)&lt;br /&gt;
Ship:setVelocity(x,y)&lt;br /&gt;
Ship:x()&lt;br /&gt;
Ship:y()&lt;br /&gt;
Ship:xSpeed()&lt;br /&gt;
Ship:ySpeed()&lt;br /&gt;
Ship:setEnergy(amount)&lt;br /&gt;
Ship:getEnergy()&lt;br /&gt;
Ship:setHealth(amount)&lt;br /&gt;
Ship:getHealth()&lt;br /&gt;
Ship:setMaxSpeed(maxSpeed)&lt;br /&gt;
Ship:getMaxSpeed()&lt;br /&gt;
Ship:setMaxBoostSpeed(maxSpeed)&lt;br /&gt;
Ship:getMaxBoostSpeed()&lt;br /&gt;
Ship:setFriction(amount)&lt;br /&gt;
Ship:getFriction()&lt;br /&gt;
Ship:destroyShip() //may not be necessary because setShipHealth(0) &lt;br /&gt;
                  //could be used&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>UnknownJoe</name></author>	</entry>

	<entry>
		<id>http://bitfighter.org/wiki/index.php/Ideas_for_triggers</id>
		<title>Ideas for triggers</title>
		<link rel="alternate" type="text/html" href="http://bitfighter.org/wiki/index.php/Ideas_for_triggers"/>
				<updated>2010-03-13T16:20:19Z</updated>
		
		<summary type="html">&lt;p&gt;UnknownJoe: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A working list of ideas for triggers that could cause execution of code in a robot or supervisor script.  Remember that robots are a kind of ship, so, generally, there's no need differentiate the two.&lt;br /&gt;
&lt;br /&gt;
//Unknown: Would this be easier do to with functions that return booleans rather than a bunch of events?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onLevelStart()  // Called after level is loaded and is ready to go.&lt;br /&gt;
onTick()        // Called every frame&lt;br /&gt;
&lt;br /&gt;
// Here, zone could be any polygonal entity: loadout zones, nexus, goal zones, etc.&lt;br /&gt;
onShipEnteredZone(ship, zone) &lt;br /&gt;
onShipLeftZone(ship, zone)&lt;br /&gt;
&lt;br /&gt;
onFlagGrabbed(flag, ship)&lt;br /&gt;
onFlagDropped(flag, dropper)&lt;br /&gt;
&lt;br /&gt;
onShipAboutToSpawn(ship)        // Called just before player spawns&lt;br /&gt;
onShipSpawned(ship)             // Called just after player spawns&lt;br /&gt;
onShipDamaged(ship, damager)&lt;br /&gt;
onShipKilled(ship, killer)&lt;br /&gt;
onShipFiring(ship, weapon, bullet)  &lt;br /&gt;
onShipUsingModule(ship, module)&lt;br /&gt;
&lt;br /&gt;
onPlayerAboutToJoinGame(ship)   // Called just before player joins&lt;br /&gt;
onPlayerJoinedGame(ship)        // Called just after player joins&lt;br /&gt;
onPlayerQuitGame(ship)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
onTurretKilled(turret, killer)&lt;br /&gt;
onAllTurretsKilled(team)&lt;br /&gt;
onForceFieldKilled(forcefield, killer)&lt;br /&gt;
onAllForceFieldKilled(team)&lt;br /&gt;
&lt;br /&gt;
onTeamScored(team, score, scoringEvent, scoringShip)&lt;br /&gt;
onIndividualScored(scoringShip, score, scoringEvent)&lt;br /&gt;
onLeadingTeamChanged(team, previousLeadingTeam)&lt;br /&gt;
onLeadingPlayerChanged(player, previousLeadingPlayer)&lt;br /&gt;
&lt;br /&gt;
onAsteroidSpawned(asteroid)&lt;br /&gt;
onAsteroidShot(asteroid, shooter)&lt;br /&gt;
onAsteroidDestroyed(asteroid, shooter)&lt;br /&gt;
&lt;br /&gt;
onHealthPackUsed(healthpack, ship)&lt;br /&gt;
onHealthPackReplenished(healthpack)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
onTurretSelectedTarget(turret, target)&lt;br /&gt;
onTurretFired(turret, target)&lt;br /&gt;
&lt;br /&gt;
// Game specific events: named on&amp;lt;Game&amp;gt;EventName&lt;br /&gt;
&lt;br /&gt;
onNexusOpen(nexus)&lt;br /&gt;
onNexusClose(nexus)&lt;br /&gt;
onNexusFlagCollected(flag, ship)&lt;br /&gt;
&lt;br /&gt;
onRabbitKilled(rabbit, killer)&lt;br /&gt;
onRabbitGrabbedFlag(rabbit)&lt;br /&gt;
&lt;br /&gt;
onZoneControlZoneCaptured(zone, capturer)&lt;br /&gt;
onZoneControlTouchDownScored(scoringShip) ( or onZonesReset() )&lt;br /&gt;
&lt;br /&gt;
onHTFFlagReturnedToZone(flag, zone, returner)&lt;br /&gt;
onHTFFlagRemovedFromZone(flag, zone, taker)&lt;br /&gt;
&lt;br /&gt;
onSoccerBallPossesionChanged(ball, possessingShip, previousPossesser)&lt;br /&gt;
onSoccerGoalScored(ball, goal, scorer)&lt;br /&gt;
onSoccerBallReset(ball) (when ball actually arrives back at starting position)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//Section by Unknown&lt;br /&gt;
//Drawing functions&lt;br /&gt;
drawSetColor(col) //col is a hex uint - 0xFFFF00 is yellow&lt;br /&gt;
drawSetAlpha(amount) //amount is a value 0-1&lt;br /&gt;
drawMove(x,y) //moves the pen to the specified position&lt;br /&gt;
drawLine(x,y) //draws a line from the pen's current position to the &lt;br /&gt;
              //specified position&lt;br /&gt;
drawRectangle(x1,y1,x2,y2)&lt;br /&gt;
drawCircle(x,y,r)&lt;br /&gt;
drawEllipse(x1,y1,x2,y2)&lt;br /&gt;
&lt;br /&gt;
//Functions that modify the game objects&lt;br /&gt;
removeObject(object || marker)&lt;br /&gt;
addObject(levelLine || (object, objectArgs))&lt;br /&gt;
translateObject(object || marker, x, y)&lt;br /&gt;
rotateObject(object || marker, x, y, amount)&lt;br /&gt;
flipObject(object || marker, vertically) //vertically is a boolean that &lt;br /&gt;
                          //determines which direction it is flipped in&lt;br /&gt;
&lt;br /&gt;
//Functions that modify the ship's properties&lt;br /&gt;
Ship:setEnergy(ship,amount)&lt;br /&gt;
Ship:getEnergy(ship)&lt;br /&gt;
Ship:setHealth(ship,amount)&lt;br /&gt;
Ship:getHealth(ship)&lt;br /&gt;
Ship:setMaxSpeed(ship,maxSpeed)&lt;br /&gt;
Ship:getMaxSpeed(ship)&lt;br /&gt;
Ship:setMaxBoostSpeed(ship,maxSpeed)&lt;br /&gt;
Ship:getMaxBoostSpeed(ship)&lt;br /&gt;
Ship:setFriction(ship,amount)&lt;br /&gt;
Ship:getFriction(ship)&lt;br /&gt;
destroyShip(ship) //may not be necessary because setShipHealth(ship,0) &lt;br /&gt;
                  //could be used&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>UnknownJoe</name></author>	</entry>

	<entry>
		<id>http://bitfighter.org/wiki/index.php/Ideas_for_triggers</id>
		<title>Ideas for triggers</title>
		<link rel="alternate" type="text/html" href="http://bitfighter.org/wiki/index.php/Ideas_for_triggers"/>
				<updated>2010-03-13T16:19:53Z</updated>
		
		<summary type="html">&lt;p&gt;UnknownJoe: Fix borders&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A working list of ideas for triggers that could cause execution of code in a robot or supervisor script.  Remember that robots are a kind of ship, so, generally, there's no need differentiate the two.&lt;br /&gt;
//Unknown: Would this be easier do to with functions that return booleans rather than a bunch of events?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onLevelStart()  // Called after level is loaded and is ready to go.&lt;br /&gt;
onTick()        // Called every frame&lt;br /&gt;
&lt;br /&gt;
// Here, zone could be any polygonal entity: loadout zones, nexus, goal zones, etc.&lt;br /&gt;
onShipEnteredZone(ship, zone) &lt;br /&gt;
onShipLeftZone(ship, zone)&lt;br /&gt;
&lt;br /&gt;
onFlagGrabbed(flag, ship)&lt;br /&gt;
onFlagDropped(flag, dropper)&lt;br /&gt;
&lt;br /&gt;
onShipAboutToSpawn(ship)        // Called just before player spawns&lt;br /&gt;
onShipSpawned(ship)             // Called just after player spawns&lt;br /&gt;
onShipDamaged(ship, damager)&lt;br /&gt;
onShipKilled(ship, killer)&lt;br /&gt;
onShipFiring(ship, weapon, bullet)  &lt;br /&gt;
onShipUsingModule(ship, module)&lt;br /&gt;
&lt;br /&gt;
onPlayerAboutToJoinGame(ship)   // Called just before player joins&lt;br /&gt;
onPlayerJoinedGame(ship)        // Called just after player joins&lt;br /&gt;
onPlayerQuitGame(ship)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
onTurretKilled(turret, killer)&lt;br /&gt;
onAllTurretsKilled(team)&lt;br /&gt;
onForceFieldKilled(forcefield, killer)&lt;br /&gt;
onAllForceFieldKilled(team)&lt;br /&gt;
&lt;br /&gt;
onTeamScored(team, score, scoringEvent, scoringShip)&lt;br /&gt;
onIndividualScored(scoringShip, score, scoringEvent)&lt;br /&gt;
onLeadingTeamChanged(team, previousLeadingTeam)&lt;br /&gt;
onLeadingPlayerChanged(player, previousLeadingPlayer)&lt;br /&gt;
&lt;br /&gt;
onAsteroidSpawned(asteroid)&lt;br /&gt;
onAsteroidShot(asteroid, shooter)&lt;br /&gt;
onAsteroidDestroyed(asteroid, shooter)&lt;br /&gt;
&lt;br /&gt;
onHealthPackUsed(healthpack, ship)&lt;br /&gt;
onHealthPackReplenished(healthpack)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
onTurretSelectedTarget(turret, target)&lt;br /&gt;
onTurretFired(turret, target)&lt;br /&gt;
&lt;br /&gt;
// Game specific events: named on&amp;lt;Game&amp;gt;EventName&lt;br /&gt;
&lt;br /&gt;
onNexusOpen(nexus)&lt;br /&gt;
onNexusClose(nexus)&lt;br /&gt;
onNexusFlagCollected(flag, ship)&lt;br /&gt;
&lt;br /&gt;
onRabbitKilled(rabbit, killer)&lt;br /&gt;
onRabbitGrabbedFlag(rabbit)&lt;br /&gt;
&lt;br /&gt;
onZoneControlZoneCaptured(zone, capturer)&lt;br /&gt;
onZoneControlTouchDownScored(scoringShip) ( or onZonesReset() )&lt;br /&gt;
&lt;br /&gt;
onHTFFlagReturnedToZone(flag, zone, returner)&lt;br /&gt;
onHTFFlagRemovedFromZone(flag, zone, taker)&lt;br /&gt;
&lt;br /&gt;
onSoccerBallPossesionChanged(ball, possessingShip, previousPossesser)&lt;br /&gt;
onSoccerGoalScored(ball, goal, scorer)&lt;br /&gt;
onSoccerBallReset(ball) (when ball actually arrives back at starting position)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//Section by Unknown&lt;br /&gt;
//Drawing functions&lt;br /&gt;
drawSetColor(col) //col is a hex uint - 0xFFFF00 is yellow&lt;br /&gt;
drawSetAlpha(amount) //amount is a value 0-1&lt;br /&gt;
drawMove(x,y) //moves the pen to the specified position&lt;br /&gt;
drawLine(x,y) //draws a line from the pen's current position to the &lt;br /&gt;
              //specified position&lt;br /&gt;
drawRectangle(x1,y1,x2,y2)&lt;br /&gt;
drawCircle(x,y,r)&lt;br /&gt;
drawEllipse(x1,y1,x2,y2)&lt;br /&gt;
&lt;br /&gt;
//Functions that modify the game objects&lt;br /&gt;
removeObject(object || marker)&lt;br /&gt;
addObject(levelLine || (object, objectArgs))&lt;br /&gt;
translateObject(object || marker, x, y)&lt;br /&gt;
rotateObject(object || marker, x, y, amount)&lt;br /&gt;
flipObject(object || marker, vertically) //vertically is a boolean that &lt;br /&gt;
                          //determines which direction it is flipped in&lt;br /&gt;
&lt;br /&gt;
//Functions that modify the ship's properties&lt;br /&gt;
Ship:setEnergy(ship,amount)&lt;br /&gt;
Ship:getEnergy(ship)&lt;br /&gt;
Ship:setHealth(ship,amount)&lt;br /&gt;
Ship:getHealth(ship)&lt;br /&gt;
Ship:setMaxSpeed(ship,maxSpeed)&lt;br /&gt;
Ship:getMaxSpeed(ship)&lt;br /&gt;
Ship:setMaxBoostSpeed(ship,maxSpeed)&lt;br /&gt;
Ship:getMaxBoostSpeed(ship)&lt;br /&gt;
Ship:setFriction(ship,amount)&lt;br /&gt;
Ship:getFriction(ship)&lt;br /&gt;
destroyShip(ship) //may not be necessary because setShipHealth(ship,0) &lt;br /&gt;
                  //could be used&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>UnknownJoe</name></author>	</entry>

	<entry>
		<id>http://bitfighter.org/wiki/index.php/Ideas_for_triggers</id>
		<title>Ideas for triggers</title>
		<link rel="alternate" type="text/html" href="http://bitfighter.org/wiki/index.php/Ideas_for_triggers"/>
				<updated>2010-03-13T16:18:09Z</updated>
		
		<summary type="html">&lt;p&gt;UnknownJoe: Added function proposals&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A working list of ideas for triggers that could cause execution of code in a robot or supervisor script.  Remember that robots are a kind of ship, so, generally, there's no need differentiate the two.&lt;br /&gt;
//Unknown: Would this be easier do to with functions that return booleans rather than a bunch of events?&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
onLevelStart()  // Called after level is loaded and is ready to go.&lt;br /&gt;
onTick()        // Called every frame&lt;br /&gt;
&lt;br /&gt;
// Here, zone could be any polygonal entity: loadout zones, nexus, goal zones, etc.&lt;br /&gt;
onShipEnteredZone(ship, zone) &lt;br /&gt;
onShipLeftZone(ship, zone)&lt;br /&gt;
&lt;br /&gt;
onFlagGrabbed(flag, ship)&lt;br /&gt;
onFlagDropped(flag, dropper)&lt;br /&gt;
&lt;br /&gt;
onShipAboutToSpawn(ship)        // Called just before player spawns&lt;br /&gt;
onShipSpawned(ship)             // Called just after player spawns&lt;br /&gt;
onShipDamaged(ship, damager)&lt;br /&gt;
onShipKilled(ship, killer)&lt;br /&gt;
onShipFiring(ship, weapon, bullet)  &lt;br /&gt;
onShipUsingModule(ship, module)&lt;br /&gt;
&lt;br /&gt;
onPlayerAboutToJoinGame(ship)   // Called just before player joins&lt;br /&gt;
onPlayerJoinedGame(ship)        // Called just after player joins&lt;br /&gt;
onPlayerQuitGame(ship)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
onTurretKilled(turret, killer)&lt;br /&gt;
onAllTurretsKilled(team)&lt;br /&gt;
onForceFieldKilled(forcefield, killer)&lt;br /&gt;
onAllForceFieldKilled(team)&lt;br /&gt;
&lt;br /&gt;
onTeamScored(team, score, scoringEvent, scoringShip)&lt;br /&gt;
onIndividualScored(scoringShip, score, scoringEvent)&lt;br /&gt;
onLeadingTeamChanged(team, previousLeadingTeam)&lt;br /&gt;
onLeadingPlayerChanged(player, previousLeadingPlayer)&lt;br /&gt;
&lt;br /&gt;
onAsteroidSpawned(asteroid)&lt;br /&gt;
onAsteroidShot(asteroid, shooter)&lt;br /&gt;
onAsteroidDestroyed(asteroid, shooter)&lt;br /&gt;
&lt;br /&gt;
onHealthPackUsed(healthpack, ship)&lt;br /&gt;
onHealthPackReplenished(healthpack)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
onTurretSelectedTarget(turret, target)&lt;br /&gt;
onTurretFired(turret, target)&lt;br /&gt;
&lt;br /&gt;
// Game specific events: named on&amp;lt;Game&amp;gt;EventName&lt;br /&gt;
&lt;br /&gt;
onNexusOpen(nexus)&lt;br /&gt;
onNexusClose(nexus)&lt;br /&gt;
onNexusFlagCollected(flag, ship)&lt;br /&gt;
&lt;br /&gt;
onRabbitKilled(rabbit, killer)&lt;br /&gt;
onRabbitGrabbedFlag(rabbit)&lt;br /&gt;
&lt;br /&gt;
onZoneControlZoneCaptured(zone, capturer)&lt;br /&gt;
onZoneControlTouchDownScored(scoringShip) ( or onZonesReset() )&lt;br /&gt;
&lt;br /&gt;
onHTFFlagReturnedToZone(flag, zone, returner)&lt;br /&gt;
onHTFFlagRemovedFromZone(flag, zone, taker)&lt;br /&gt;
&lt;br /&gt;
onSoccerBallPossesionChanged(ball, possessingShip, previousPossesser)&lt;br /&gt;
onSoccerGoalScored(ball, goal, scorer)&lt;br /&gt;
onSoccerBallReset(ball) (when ball actually arrives back at starting position)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//Section by Unknown&lt;br /&gt;
//Drawing functions&lt;br /&gt;
drawSetColor(col) //col is a hex uint - 0xFFFF00 is yellow&lt;br /&gt;
drawSetAlpha(amount) //amount is a value 0-1&lt;br /&gt;
drawMove(x,y) //moves the pen to the specified position&lt;br /&gt;
drawLine(x,y) //draws a line from the pen's current position to the specified position&lt;br /&gt;
drawRectangle(x1,y1,x2,y2)&lt;br /&gt;
drawCircle(x,y,r)&lt;br /&gt;
drawEllipse(x1,y1,x2,y2)&lt;br /&gt;
&lt;br /&gt;
//Functions that modify the game objects&lt;br /&gt;
removeObject(object || marker)&lt;br /&gt;
addObject(levelLine || (object, objectArgs))&lt;br /&gt;
translateObject(object || marker, x, y)&lt;br /&gt;
rotateObject(object || marker, x, y, amount)&lt;br /&gt;
flipObject(object || marker, vertically) //vertically is a boolean that determines which direction it is flipped in&lt;br /&gt;
&lt;br /&gt;
//Functions that modify the ship's properties&lt;br /&gt;
Ship:setEnergy(ship,amount)&lt;br /&gt;
Ship:getEnergy(ship)&lt;br /&gt;
Ship:setHealth(ship,amount)&lt;br /&gt;
Ship:getHealth(ship)&lt;br /&gt;
Ship:setMaxSpeed(ship,maxSpeed)&lt;br /&gt;
Ship:getMaxSpeed(ship)&lt;br /&gt;
Ship:setMaxBoostSpeed(ship,maxSpeed)&lt;br /&gt;
Ship:getMaxBoostSpeed(ship)&lt;br /&gt;
Ship:setFriction(ship,amount)&lt;br /&gt;
Ship:getFriction(ship)&lt;br /&gt;
destroyShip(ship) //may not be necessary because setShipHealth(ship,0) could be used&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>UnknownJoe</name></author>	</entry>

	<entry>
		<id>http://bitfighter.org/wiki/index.php/Programming_robots</id>
		<title>Programming robots</title>
		<link rel="alternate" type="text/html" href="http://bitfighter.org/wiki/index.php/Programming_robots"/>
				<updated>2010-03-08T20:44:58Z</updated>
		
		<summary type="html">&lt;p&gt;UnknownJoe: Changed isModuleActive to correct name isModActive&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Starting with release 011, server admins will be able to program their own robots in addition to designing their own levels.  Robots will be coded in Lua, and will will have a number of special functions available to them.  &lt;br /&gt;
&lt;br /&gt;
For examples of fully functional bots, see the [[Robot_gallery|Robot Gallery]].  &lt;br /&gt;
&lt;br /&gt;
Robot coding is still fluid, and everything is subject to change, but here is a list of commands being implemented for the next alpha release (see forums for the URL):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How to read the function notation:&lt;br /&gt;
&lt;br /&gt;
returnType &amp;lt;b&amp;gt;funtionName(argType1, argType2)&amp;lt;/b&amp;gt; - Description of function&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Return types:&lt;br /&gt;
Unlike most languages, Lua does not differentiate between integers and floating point numbers.  Instead, everything is simply a number.  In fact, Lua often will let you interchange strings and numbers, converting dynamically on an as-needed basis.  For the most part, relying on this automatic type coercion is bad practice and will get you into trouble.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Points to remember in Lua:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lua arrays are 1-based: the first index is 1 rather than 0 as is the case in most programming languages&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Lua is case sensitive.  That means that the variable foo is different than Foo and FOO&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Any variable not declared as local will be global.  Accessing global varibales is slower than local ones, and being sloppy about variable scope can lead to unexpected problems.  Use the local keyword whenever appropriate.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will follow the Lua formatting conventions used in the Programming in Lua book.&lt;br /&gt;
&lt;br /&gt;
== Navigation, configuration, and combat ==&lt;br /&gt;
&lt;br /&gt;
There are two general methods for getting the current game time:&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getTime()&amp;lt;/b&amp;gt; - Returns time for this frame, in ms.&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getCPUTime()&amp;lt;/b&amp;gt; - Returns number representing the CPU time in ms.  Can be used to time events&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These functions will return slightly different results.  Generally speaking, if you are timing things in the &amp;quot;real world&amp;quot;, i.e. you want to pause for exactly 1 second, use getCPUTime().  If you want to use a timer to make the robot move smoothly around a mathematically derived course, use getTime(), as that is what is used internally when calculating ship movement.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
lastTime = thisTime&lt;br /&gt;
thisTime = bot:getCPUTime()&lt;br /&gt;
local delta = thisTime - lastTime&lt;br /&gt;
logprint(delta .. &amp;quot; ms have elapsed in the real world since last frame.&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Will fly robot in a circular orbit around an item.&lt;br /&gt;
-- Assume we've already found one and stored it in &amp;quot;item&amp;quot;&lt;br /&gt;
&lt;br /&gt;
local botLoc = bot:getLoc()&lt;br /&gt;
local itemLoc = item:getLoc()&lt;br /&gt;
&lt;br /&gt;
local dist = botLoc:distanceTo(itemLoc)&lt;br /&gt;
&lt;br /&gt;
-- For this example, we'll define orbitRadius as a local variable.  In a&lt;br /&gt;
-- real robot, this might be better declared a global variable in the header. &lt;br /&gt;
local orbitRadius = 300    &lt;br /&gt;
&lt;br /&gt;
-- Here we use the getTime() function to make the motion look smooth.&lt;br /&gt;
-- If we just advanced orbitAng by a fixed amount each frame, it would&lt;br /&gt;
-- appear jerky, as each frame represents a slightly different length in time.&lt;br /&gt;
&lt;br /&gt;
-- .0015 determined experimentally&lt;br /&gt;
&lt;br /&gt;
orbitAng = orbitAng + .0015 * bot:getTime()  -- orbitAng is a global variable&lt;br /&gt;
&lt;br /&gt;
local dest = nil&lt;br /&gt;
if(dist &amp;lt;= orbitRadius * 1.1) then &lt;br /&gt;
    dest = itemLoc&lt;br /&gt;
    dest:setxy(itemLoc:x() + orbitRadius * math.cos(orbitAng),&lt;br /&gt;
               itemLoc:y() + orbitRadius * math.sin(orbitAng) )&lt;br /&gt;
else&lt;br /&gt;
    dest = itemLoc&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
bot:setThrustToPt(dest)         -- Travel towards calculated point&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;getZoneCenter(x, y)&amp;lt;/b&amp;gt; - Return point representing center of zone containing point x,y&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;getGatewayFromZoneToZone(a, b )&amp;lt;/b&amp;gt; - Return point representing fastest way from zone a to zone b.  If zones a &amp;amp; b are not neighbors, returns nil&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getZoneCount()&amp;lt;/b&amp;gt; - Return number of zones&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getCurrentZone()&amp;lt;/b&amp;gt; - Return current zone that robot is in&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getAngle()&amp;lt;/b&amp;gt; - Return angle robot is currently facing&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getLoc()&amp;lt;/b&amp;gt; - Return point representing location of robot&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;setAngle(ang)&amp;lt;/b&amp;gt; - Point robot at angle&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-- This code in getMove()&lt;br /&gt;
&lt;br /&gt;
    local items = bot:findItems(AsteroidType)  -- Get list of all asteroids&lt;br /&gt;
    local asteroid = findClosest(items)     -- Finds closest&lt;br /&gt;
&lt;br /&gt;
    if(asteroid == nil) then                -- Make sure we found one&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    local loc = bot:getLoc()                -- Our location (Point object)&lt;br /&gt;
    local ang = loc:angleTo( asteroid:getLoc() )&lt;br /&gt;
    bot:setAngle(ang)                       -- Aim ship toward asteroid &lt;br /&gt;
    bot:fire()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void &amp;lt;b&amp;gt;setAnglePt(Point)&amp;lt;/b&amp;gt; - Point robot towards Point&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getAnglePt(Point)&amp;lt;/b&amp;gt; - Compute angle to Point&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;hasLosPt(Point)&amp;lt;/b&amp;gt; - Return whether or not robot can see Point&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getFiringSolution(item)&amp;lt;/b&amp;gt; - Calculate angle at which robot needs to fire to hit moving or stationary object.  Will return nil if the item is out of range, behind an obstacle, or firing will hit a friendly ship.  Always check the return value for nil!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    local loc = bot:getLoc()                                -- Currend location&lt;br /&gt;
    local items = bot:findGlobalItems(SoccerBallItemType)   -- Find soccerball&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
    -- Loop through all returned items and find the closest&lt;br /&gt;
    -- This code here for learning purposes... could be replaced with&lt;br /&gt;
    -- much simpler single line:&lt;br /&gt;
    -- local ball = findClosest(items)&lt;br /&gt;
&lt;br /&gt;
    local minDist = 99999999&lt;br /&gt;
    local ball = nil&lt;br /&gt;
    &lt;br /&gt;
    for sb in values(items) do&lt;br /&gt;
        local l = sb:getLoc()           -- Ball's location&lt;br /&gt;
        &lt;br /&gt;
        -- Distance from ship to ball (use distSquared because&lt;br /&gt;
        -- it is easy to compute and good for comparison)&lt;br /&gt;
        local d = loc:distSquared(l)    &lt;br /&gt;
                &lt;br /&gt;
        if(d &amp;lt; minDist) then&lt;br /&gt;
           ball = sb&lt;br /&gt;
           minDist = d&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    -- End replaceable code section&lt;br /&gt;
&lt;br /&gt;
    -- Check to make sure we found a soccer ball ... could be out of view&lt;br /&gt;
    if(ball == nil) then&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
    local ang = bot:getFiringSolution(sb)   -- Get shoot angle to hit moving ball&lt;br /&gt;
   &lt;br /&gt;
    -- Always check for nil: could happen if ball were behind a wall or &lt;br /&gt;
    -- friendly ship.  Running setAngle(nil) will do nothing.&lt;br /&gt;
    if(ang == nil) then&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    bot:setAngle(ang)    -- Ready... aim...&lt;br /&gt;
    bot:fire()           --  ...fire!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getTeamIndx()&amp;lt;/b&amp;gt; - Return index of team this robot is on&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;hasFlag()&amp;lt;/b&amp;gt; - Return whether or not robot currently has the flag&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
WeaponType &amp;lt;b&amp;gt;getActiveWeapon()&amp;lt;/b&amp;gt; - Return currently selected weapon&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
weap = bot:getActiveWeapon()    -- Get info about our currently active weapon&lt;br /&gt;
weapInfo = WeaponInfo(weap)     -- Get information about it   &lt;br /&gt;
logprint(weapInfo:getName() .. &amp;quot; has a range of &amp;quot; .. weapInfo:getRange())&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modules are automatically disabled at the end of each game cycle.  Therefore, if you want to keep a module on for a sustained period of time, you must activate it each time getMove() is called.  To activate a module, use one of the activateModule() commands.&lt;br /&gt;
&lt;br /&gt;
void &amp;lt;b&amp;gt;activateModule(ModuleType)&amp;lt;/b&amp;gt; - Activate module, specified by ModuleType.  If specified module is not included in the current loadout, this command will have no effect.&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Note that this line will do nothing if we don't have shields&lt;br /&gt;
bot:activateModule(ModuleShield)    -- Shields up!&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void &amp;lt;b&amp;gt;activateModuleIndex(indx)&amp;lt;/b&amp;gt; - Activate module, specified by its index (1 or 2)&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Must specify an index, currently either 1 or 2&lt;br /&gt;
bot:activateModuleIndex(1)          -- Activate first module, whatever it is&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void &amp;lt;b&amp;gt;setReqLoadout(Loadout)&amp;lt;/b&amp;gt; - Set the requested loadout to Loadout&amp;lt;br&amp;gt;&lt;br /&gt;
Loadout &amp;lt;b&amp;gt;getCurrLoadout()&amp;lt;/b&amp;gt; - Returns current loadout&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
loadout = bot:getCurrLoadout()       -- Retrieve current bot configuration&lt;br /&gt;
&lt;br /&gt;
weapType1 = loadout:getWeapon(1)     -- Get the first weapon&lt;br /&gt;
weapType2 = loadout:getWeapon(2)     -- Get the second weapon&lt;br /&gt;
weapType3 = loadout:getWeapon(3)     -- Get the third weapon&lt;br /&gt;
&lt;br /&gt;
-- Check to see if the first weapon is a phaser&lt;br /&gt;
if (weapType1 == WeaponPhaser) then&lt;br /&gt;
   logprint(&amp;quot;First weapon is a phaser!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Print a list of our three current weapons&lt;br /&gt;
logprint(&amp;quot;My three weapons are: &amp;quot; .. WeaponInfo(weapType1):getName() .. &amp;quot;, &amp;quot;&lt;br /&gt;
                                  .. WeaponInfo(weapType2):getName() .. &amp;quot;, and &amp;quot;&lt;br /&gt;
                                  .. WeaponInfo(weapType3):getName())&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loadout &amp;lt;b&amp;gt;getReqLoadout()&amp;lt;/b&amp;gt; - Returns requested loadout&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Navigation&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[Item list]&amp;lt;b&amp;gt;findItems(ObjectType,  ...)&amp;lt;/b&amp;gt; - Return a list of items of the specified type or types that are within the robot's viewable area&amp;lt;br&amp;gt;&lt;br /&gt;
[Item list]&amp;lt;b&amp;gt;findGlobalItems(ObjectType,  ...)&amp;lt;/b&amp;gt; - Return a list of items of the specified type or types that are anywhere in the game.  Note that items that would ordinarily be out of scope will &amp;lt;i&amp;gt;not&amp;lt;/i&amp;gt; be included in this list!&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Find all resource items in the normal viewport&lt;br /&gt;
local items = bot:findItems(ResourceItemType)                   &lt;br /&gt;
&lt;br /&gt;
-- You can specify multiple item types if you want&lt;br /&gt;
-- Get a list of all TestItems or Asteroids that are visible anywhere&lt;br /&gt;
-- (note that items that are out-of-scope will be omitted)&lt;br /&gt;
local globItems = bot:findGlobalItems(TestItemType, AsteroidType)  &lt;br /&gt;
&lt;br /&gt;
-- Now iterate over the list ... there are many examples in the documentation!&lt;br /&gt;
for item in values(globItems) do&lt;br /&gt;
    -- Do something with item ... perhaps figure out which is closest, &lt;br /&gt;
    -- which is heading towards us, etc.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;getWaypoint(Point)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Ship control&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;setThrust(vel, angle)&amp;lt;/b&amp;gt; - Set robot's velocity to vel (0-1), at angle&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;setThrustPt(vel, Point)&amp;lt;/b&amp;gt;  - Set robot's velocity to vel (0-1), toward Point. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;setThrustToPt(Point)&amp;lt;/b&amp;gt; - Thrust toward Point, but adjust speed in an attempt to land right on point, and not overshoot.  If Point is distant, setThrustToPt() will cause robot to go at full speed.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;fire()&amp;lt;/b&amp;gt; - Fires active weapon&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;setWeaponIndex(index)&amp;lt;/b&amp;gt; - Activates weapon with index (1, 2, 3)&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;setWeapon(WeaponType)&amp;lt;/b&amp;gt; - Activates weapon type specified (does nothing if WeaponType is not in current loadout)&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;hasWeapon (WeaponType)&amp;lt;/b&amp;gt; - Does current configuration have specified weapon&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if(bot:hasWeapon(WeaponMine)) then&lt;br /&gt;
    bot:setWeapon(WeaponMine)      -- Make mine layer active if it's &lt;br /&gt;
                                   --     part of our current loadout&lt;br /&gt;
    bot:fire()                     -- Lay a mine&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Logging &amp;amp; Sending Messages==&lt;br /&gt;
void &amp;lt;b&amp;gt;globalMsg(msg)&amp;lt;/b&amp;gt; - Send a message to all players&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;teamMsg(msg)&amp;lt;/b&amp;gt; - Send a message to players on the same team&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;logprint(msg)&amp;lt;/b&amp;gt; - Print msg to game logfile&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GameItems ==&lt;br /&gt;
&lt;br /&gt;
The Lua object structure generally follows that used by Bitfighter.  The GameItems group conisists of Ships, Robots, RepairItems, Asteroids, ResourceItems, SoccerBallItems, Flags, NexusFlags, and TestItems.  These all share similar properties, and have similar methods.  All of these implement the getLoc(), getVel(), and getRad() methods for querying location, velocity, and radius respectively.  Some items have additional methods that apply only to them.  See below for details on these additional methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ships &amp;amp; Robots ===&lt;br /&gt;
&lt;br /&gt;
Point &amp;lt;b&amp;gt;getLoc()&amp;lt;/b&amp;gt; - Center of item&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getRad()&amp;lt;/b&amp;gt; - Radius of item&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getVel()&amp;lt;/b&amp;gt; - Speed of item&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
number &amp;lt;b&amp;gt;getTeamIndx()&amp;lt;/b&amp;gt; - Index of the team this ship/robot is on&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;isModActive(ModuleType)&amp;lt;/b&amp;gt; - Returns true if specified module is active&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== TestItems, ResourceItems, and SoccerBallItems === &lt;br /&gt;
These items all have the same methods and behave in a very similar manner. &lt;br /&gt;
Category: GameItem&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getLoc()&amp;lt;/b&amp;gt; - Center of item&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getRad()&amp;lt;/b&amp;gt; - Radius of item&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getVel()&amp;lt;/b&amp;gt; - Speed of item&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local items = bot:findItems(TestItemType)  -- Find all TestItems in view&lt;br /&gt;
&lt;br /&gt;
-- Now cycle through all returned items and find the fastest one&lt;br /&gt;
local maxSpeed = -1&lt;br /&gt;
local fastest = nil&lt;br /&gt;
&lt;br /&gt;
for indx, ti in ipairs(items) do&lt;br /&gt;
    -- getVel() returns a point representing the x and y components of&lt;br /&gt;
    -- the velocity.  Need to use len() to get actual speed.  Or, in this&lt;br /&gt;
    -- case, since actual speed isn't important, we can use lenSquared()&lt;br /&gt;
    -- which is less computationally intensive, and will yield perfectly&lt;br /&gt;
    -- good results for comparison purposes (such as finding the fastest).&lt;br /&gt;
    spd = ti:getVel():lenSquared()  &lt;br /&gt;
&lt;br /&gt;
    if(spd &amp;gt; maxSpeed) then&lt;br /&gt;
        fastest = ti&lt;br /&gt;
        maxSpeed = spd &lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Better check to make sure fastest isn't nil before using it!&lt;br /&gt;
-- Could be nil if there are no TestItems in view&lt;br /&gt;
&lt;br /&gt;
if(fastest != nil) then&lt;br /&gt;
   -- Do something&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Asteroids ===&lt;br /&gt;
Category: GameItem&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getLoc()&amp;lt;/b&amp;gt; - Center of asteroid&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getRad()&amp;lt;/b&amp;gt; - Radius of asteroid&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getVel()&amp;lt;/b&amp;gt; - Speed of asteroid&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getSize()&amp;lt;/b&amp;gt; - Index of current asteroid size (0 = initial size, 1 = next smaller, 2 =  ...)&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getSizeCount()&amp;lt;/b&amp;gt; - Number of indexes of size we can have&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local asteroids = bot:findItems(AsteroidType) &lt;br /&gt;
local target = asteroids[1]:getLoc()  -- Pick first asteroid&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RepairItems ===&lt;br /&gt;
Category: GameItem&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getLoc()&amp;lt;/b&amp;gt; - Center of RepairItem&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getRad()&amp;lt;/b&amp;gt; - Radius of RepairItem&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getVel()&amp;lt;/b&amp;gt; - Speed of RepairItem (usually 0,0)&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;isVis()&amp;lt;/b&amp;gt; - Is repair item currently visible?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local ri = bot:findItems(RepairItemType)   -- Get list of all known RepairItems  &lt;br /&gt;
local pos = ri[1]:getLoc()                 -- Get position of first&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Flags ===&lt;br /&gt;
Category: GameItem&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getLoc()&amp;lt;/b&amp;gt; - Center of Flag&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getRad()&amp;lt;/b&amp;gt; - Radius of Flag&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getVel()&amp;lt;/b&amp;gt; - Speed of Flag (usually 0,0)&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getTeamIndx()&amp;lt;/b&amp;gt; - Get index of owning team (-1 for neutral flag)&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;isInInitLoc()&amp;lt;/b&amp;gt; - Is flag in it's initial location?&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;inCaptureZone()&amp;lt;/b&amp;gt; - Is flag in a team's capture zone?&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;isOnShip()&amp;lt;/b&amp;gt; - Is flag being carried by a ship?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== NexusFlags ===&lt;br /&gt;
Category: GameItem&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;Note: Only appears in Nexus games.&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getLoc()&amp;lt;/b&amp;gt; - Center of NexusFlag&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getRad()&amp;lt;/b&amp;gt; - Radius of NexusFlag&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getVel()&amp;lt;/b&amp;gt; - Speed of NexusFlag&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Turrets and ForceFieldProjectors ===&lt;br /&gt;
Category: GameItem&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Point &amp;lt;b&amp;gt;getLoc()&amp;lt;/b&amp;gt; - Center of NexusFlag&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getRad()&amp;lt;/b&amp;gt; - Radius of NexusFlag&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getVel()&amp;lt;/b&amp;gt; - Speed of NexusFlag&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getTeamIndx()&amp;lt;/b&amp;gt; - Get index of owning team (or -1 for neutral, -2 for hostile)&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getHealth()&amp;lt;/b&amp;gt; - Get health of item (1 = full heath, 0 = totally dead)&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;isActive()&amp;lt;/b&amp;gt; - True if item is active, false otherwise&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Bullets, Mines, and SpyBugs ===&lt;br /&gt;
Category: GameItem&amp;lt;br&amp;gt;&lt;br /&gt;
There are three GameItem types that have to do with bullets, mines, and spybugs: BulletType, MineType, and SpyBugType respectively.  They all have the same methods, and can be used somewhat interchangeably, as shown in the example below.  However, as shown, they can also be found independently.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
BulletType encompases Phaseser, Bounce, Triple, Burst, and Turret shots, the properties of which can be retrieved with the WeaponInfo object.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Point &amp;lt;b&amp;gt;getLoc()&amp;lt;/b&amp;gt; - Center of item&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getRad()&amp;lt;/b&amp;gt; - Radius of item&amp;lt;br&amp;gt;&lt;br /&gt;
Point &amp;lt;b&amp;gt;getVel()&amp;lt;/b&amp;gt; - Speed of item (usually 0,0)&amp;lt;br&amp;gt;&lt;br /&gt;
WeaponType &amp;lt;b&amp;gt;getWeapon()&amp;lt;/b&amp;gt; - Return WeaponType for this item&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local bullets = bot:findItems(BulletType, MineType, SpyBugType) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;some code&amp;gt;    -- Code here to select one of the found items&lt;br /&gt;
&lt;br /&gt;
local weap = selectedBullet:getWeapon()&lt;br /&gt;
local weapInfo = WeaponInfo(weap)&lt;br /&gt;
logprint(&amp;quot;Selected &amp;quot;  ..  weapInfo:getName())&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Weapon Information ==&lt;br /&gt;
All WeaponInfo data will remain constant throughout the game.  Therefore, if you need some information about a weapon (mines, say, for a minesweeping bot), it might make sense to retrieve it in the bot's header and store it in a global variable rather than instantiating a new WeaponInfo object during every loop of the robot's getMove() method.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local weap = bot:getActiveWeapon()      -- Get bot's currently active weapon&lt;br /&gt;
logprint(weap:getName() .. &amp;quot; shoots with a speed of &amp;quot; .. weap:getProjVel())&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- In header... we'd better not declare these variables as local!&lt;br /&gt;
turretInfo = WeaponInfo(WeaponTurret)   -- Get info about those infernal turrets&lt;br /&gt;
turretRange = turretInfo:getRange()     -- Stay this far from turrets to be safe&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
string &amp;lt;b&amp;gt;getName()&amp;lt;/b&amp;gt; - Name of weapon (&amp;quot;Phaser&amp;quot;, &amp;quot;Triple&amp;quot;, etc.)&amp;lt;br&amp;gt;&lt;br /&gt;
WeaponType &amp;lt;b&amp;gt;getID()&amp;lt;/b&amp;gt; - ID of module (WeaponPhaser, WeaponTriple, etc.)&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getRange()&amp;lt;/b&amp;gt; - Get range of weapon (units)&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getFireDelay()&amp;lt;/b&amp;gt; - Delay between shots in ms&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getMinEnergy()&amp;lt;/b&amp;gt; - Minimum energy needed to use&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getEnergyDrain()&amp;lt;/b&amp;gt; - Amount of energy weapon consumes&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getProjVel()&amp;lt;/b&amp;gt; - Speed of projectile (units/sec)&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getProjLife()&amp;lt;/b&amp;gt; - Time projectile will live (ms) -1 == live forever)&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getDamage()&amp;lt;/b&amp;gt; - Damage projectile does (0-1, where 1 = total destruction)&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getDamageSelf()&amp;lt;/b&amp;gt; - Damage if shooter shoots self (0-1, where 1 = total destruction)&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;getCanDamageTeammate()&amp;lt;/b&amp;gt; - Will weapon damage teammates?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WeaponType constants ==&lt;br /&gt;
&amp;lt;table width=100%&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td width=50%&amp;gt;&amp;lt;b&amp;gt;WeaponPhaser&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;WeaponBounce&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;WeaponTriple&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;WeaponBurst&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;WeaponMine&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;WeaponSpyBug&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;WeaponTurret&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Module Information ==&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mod = ModuleInfo(ModuleBoost)&lt;br /&gt;
logprint(&amp;quot;This is a lame example!&amp;quot;)&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
string &amp;lt;b&amp;gt;getName()&amp;lt;/b&amp;gt; - Name of module (&amp;quot;Shield&amp;quot;, &amp;quot;Turbo&amp;quot;, etc.)&amp;lt;br&amp;gt;&lt;br /&gt;
ModuleType &amp;lt;b&amp;gt;getID()&amp;lt;/b&amp;gt; - ID of module (ModuleShield, ModuleBoost, etc.)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ModuleType constants ==&lt;br /&gt;
&amp;lt;table width = 100%&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td width=50%&amp;gt;&amp;lt;b&amp;gt;ModuleShield&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ModuleBoost&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ModuleSensor&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ModuleRepair&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ModuleCloak&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ModuleEngineer&amp;lt;/b&amp;gt; (maybe someday)&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loadouts ==&lt;br /&gt;
void &amp;lt;b&amp;gt;setWeapon(index, WeaponType)&amp;lt;/b&amp;gt; - Set weapon at index&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;setModule(index, ModuleType)&amp;lt;/b&amp;gt; - Set module at index&amp;lt;br&amp;gt;&lt;br /&gt;
WeaponType &amp;lt;b&amp;gt;getWeapon(index)&amp;lt;/b&amp;gt; - Return weapon at index&amp;lt;br&amp;gt;&lt;br /&gt;
ModuleType &amp;lt;b&amp;gt;getModule(index)&amp;lt;/b&amp;gt; - Return module at index&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Get a new loadout (comes pre-filled with default values)&lt;br /&gt;
local loadout = Loadout()&lt;br /&gt;
&lt;br /&gt;
-- Configure the loadout to suit our needs&lt;br /&gt;
loadout:setWeapon(1, WeaponPhaser)&lt;br /&gt;
loadout:setWeapon(2, WeaponBurst)&lt;br /&gt;
loadout:setWeapon(3, WeaponMine)&lt;br /&gt;
loadout:setModule(1, ModuleShield)&lt;br /&gt;
loadout:setModule(2, ModuleCloak)&lt;br /&gt;
&lt;br /&gt;
-- Set the loadout, will become active when bot hits loadout zone&lt;br /&gt;
-- or spawns, depending on game&lt;br /&gt;
bot:setReqLoadout(loadout)     &lt;br /&gt;
&lt;br /&gt;
if(loadout:getWeapon(1) == WeaponPhaser) then&lt;br /&gt;
   logprintf(&amp;quot;This line always gets printed!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
boolean &amp;lt;b&amp;gt;isValid()&amp;lt;/b&amp;gt; - Is loadout config valid?&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;equals(Loadout)&amp;lt;/b&amp;gt; - is loadout the same as Loadout?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GameInfo ==&lt;br /&gt;
&lt;br /&gt;
You can get information about the current game with the GameInfo object. You only need get this object once, then you can use it as often as you like.  It will always reflect the latest data. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
game = GameInfo()           -- Create the GameInfo object &lt;br /&gt;
gameType = game:getGameType()&lt;br /&gt;
&lt;br /&gt;
if(gameType == SoccerGame) then&lt;br /&gt;
   logprint(&amp;quot;This bot is not very good at soccer!&amp;quot;)&lt;br /&gt;
else&lt;br /&gt;
   gameTypeName = game:getGameTypeName()&lt;br /&gt;
   logprintf(&amp;quot;I just love playing &amp;quot; .. gameTypeName .. &amp;quot;!&amp;quot;)   &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Create the GameInfo object in header (don't declare it local!!)&lt;br /&gt;
game = GameInfo()           &lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
-- Even though we only create our GameInfo once, it is always current&lt;br /&gt;
&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
-- Later, in getMove():&lt;br /&gt;
local remTime = game:getGameTimeReamaining()&lt;br /&gt;
local totTime = game:getGameTimeTotal()&lt;br /&gt;
local percent = (totTime - remTime) / remTime&lt;br /&gt;
logprint(&amp;quot;Game is &amp;quot; .. percent .. &amp;quot;% over)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
GameType  &amp;lt;b&amp;gt;getGameType()&amp;lt;/b&amp;gt; - Return current game typet) &amp;lt;br&amp;gt;&lt;br /&gt;
string &amp;lt;b&amp;gt;getGameTypeName()&amp;lt;/b&amp;gt; - Return current game type &amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getFlagCount()&amp;lt;/b&amp;gt; - Return the number of flags in the game&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getWinningScore()&amp;lt;/b&amp;gt; - Returns the score required to win the level&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getGameTimeTotal()&amp;lt;/b&amp;gt; - Returns the time (in seconds) that the level will be played for&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getGameTimeRemaining()&amp;lt;/b&amp;gt; - Returns the time remaining (in seconds) for this level&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getLeadingScore()&amp;lt;/b&amp;gt; - Gets score of the leading team&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getLeadingTeam()&amp;lt;/b&amp;gt; - Gets index of leading team&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getTeamCount()&amp;lt;/b&amp;gt; - Return number of teams&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Create the GameInfo object in header (don't declare it local!!)&lt;br /&gt;
game = GameInfo()           &lt;br /&gt;
 ...&lt;br /&gt;
-- Then later ...&lt;br /&gt;
 ...&lt;br /&gt;
local leadingTeam = game:getLeadingTeam()&lt;br /&gt;
local team = TeamInfo(leadingTeam)&lt;br /&gt;
bot:teamMsg(&amp;quot;Hurry up! Team &amp;quot; .. team:getName() .. &amp;quot; is winning!&amp;quot; )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
string &amp;lt;b&amp;gt;getLevelName()&amp;lt;/b&amp;gt; - Gets the level's name&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getGridSize()&amp;lt;/b&amp;gt; - Gets the level's gridSize parameter&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;getIsTeamGame()&amp;lt;/b&amp;gt; - Is this a team game?&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;getEventScore(ScoringEvent)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GameType constants ==&lt;br /&gt;
&amp;lt;table width=100%&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td width=50%&amp;gt;&amp;lt;b&amp;gt;BitmatchGame&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;CTFGame&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;HTFGame&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;NexusGame&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;RabbitGame&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;RetrieveGame&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;SoccerGame&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ZoneControlGame&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ScoringEvent constants ==&lt;br /&gt;
&amp;lt;table width=100%&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td width=50%&amp;gt;&amp;lt;b&amp;gt;KillEnemy&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;KillSelf&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;KillTeammate&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;KillEnemyTurret&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;KillOwnTurret&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;CaptureFlag&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;CaptureZone&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;UncaptureZone&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;HoldFlagInZone&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;RemoveFlagFromEnemyZone&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;RabbitHoldsFlag&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;RabbitKilled&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;RabbitKills&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ReturnFlagsToNexus&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ReturnFlagToZone&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;LostFlag&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ReturnTeamFlag&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ScoreGoalEnemyTeam&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ScoreGoalHostileTeam&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;ScoreGoalOwnTeam&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== TeamInfo ==&lt;br /&gt;
string &amp;lt;b&amp;gt;getName()&amp;lt;/b&amp;gt; - return team name&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getIndex()&amp;lt;/b&amp;gt; - return team's index, index of first team is 1&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getPlayerCount()&amp;lt;/b&amp;gt; - return player count&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getScore()&amp;lt;/b&amp;gt; - return team score&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local gameInfo = GameInfo()&lt;br /&gt;
local teams = gameInfo:getTeamCount()&lt;br /&gt;
&lt;br /&gt;
-- Note that while the number of teams will not change throughout the game,&lt;br /&gt;
-- the number of players on each team might.  Also, the robot may be initialized&lt;br /&gt;
-- before the players have been added, so if you run this code in the bot header, &lt;br /&gt;
-- it may report some teams having 0 players.&lt;br /&gt;
&lt;br /&gt;
for i = 1, teams do        -- First team has an index of 1&lt;br /&gt;
   team = TeamInfo(i)&lt;br /&gt;
   logprint(&amp;quot;Team &amp;quot; .. i .. &amp;quot; is called &amp;quot; .. team:getName() .. &lt;br /&gt;
      &amp;quot; and has &amp;quot; .. team:getPlayerCount() .. &amp;quot; players&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Timers ==&lt;br /&gt;
Timer is a utility class that makes it easier to manage timing periodic or delayed events. &lt;br /&gt;
&lt;br /&gt;
void &amp;lt;b&amp;gt;reset()&amp;lt;/b&amp;gt; - Reset the timer.&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getTime()&amp;lt;/b&amp;gt; - Returns time left on the timer (in ms)&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;getFraction()&amp;lt;/b&amp;gt; - Returns the fraction of the timer left (1 = all time left, 0 = no time left)&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;setPeriod(time)&amp;lt;/b&amp;gt; - Set the time on the timer, and resets it.&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;update(time)&amp;lt;/b&amp;gt; - Update the timer by the specified amount of time (in ms), and return true if timer has gone off.  Use bot:getTime() as the time parameter.&amp;lt;br&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- In header:&lt;br /&gt;
timer = Timer(1000)      -- Set timer that will go off every second&lt;br /&gt;
 ...&lt;br /&gt;
-- Then later, in getMove()&lt;br /&gt;
 ...&lt;br /&gt;
if(timer:update(bot:getTime())) then   -- Always update with bot:getTime()&lt;br /&gt;
   logprint(&amp;quot;1 sec has elapsed!&amp;quot;)      -- Msg will get printed every second&lt;br /&gt;
   timer:reset()                       -- Start timer over&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Points ==&lt;br /&gt;
&lt;br /&gt;
Point is a utility class to make handling coordinates or vectors simpler.  You can create your own point objects using the constructor, or you can get them as return values from many functions.&lt;br /&gt;
&lt;br /&gt;
Point &amp;lt;b&amp;gt;Point(x, y)&amp;lt;/b&amp;gt; - Create a new Point object with coordinates x, y.  You do not need to use setxy() unless you want to change the coords later.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
number &amp;lt;b&amp;gt;x()&amp;lt;/b&amp;gt; - Return x value&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;y()&amp;lt;/b&amp;gt; - Return y value&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;setxy(x, y)&amp;lt;/b&amp;gt; - Update coordinates of point&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;setx(x)&amp;lt;/b&amp;gt; - Update x coordinate of point&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;sety(y)&amp;lt;/b&amp;gt; - Update y coordinate of point&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
number &amp;lt;b&amp;gt;len()&amp;lt;/b&amp;gt; - Returns the length of the point, useful if point represents a velocity or other vector&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;lenSquared()&amp;lt;/b&amp;gt; - Returns the length squared of the point, useful if point represents a velocity or other vector, and you want a less computationally expensive representation of length that will work for comparative purposes&amp;lt;br&amp;gt;&lt;br /&gt;
boolean &amp;lt;b&amp;gt;equals(Point)&amp;lt;/b&amp;gt; - Returns true if the point is the same as Point&amp;lt;br&amp;gt;&lt;br /&gt;
void &amp;lt;b&amp;gt;normalize(length)&amp;lt;/b&amp;gt; - If Point represents a vector, set its length to &amp;lt;i&amp;gt;length&amp;lt;/i&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;distanceTo(Point)&amp;lt;/b&amp;gt; - Returns distance from point to Point&amp;lt;br&amp;gt;&lt;br /&gt;
number &amp;lt;b&amp;gt;distSquared(Point)&amp;lt;/b&amp;gt; - Returns distance squared from point to Point (less computationally intensive, good for comparison)&amp;lt;br&amp;gt; &lt;br /&gt;
number &amp;lt;b&amp;gt;angleTo(Point)&amp;lt;/b&amp;gt; - Returns angle from point to Point&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local point = Point(0, 0)      -- Create a new point&lt;br /&gt;
&lt;br /&gt;
if(point:equals(Point(1, 1)) then       &lt;br /&gt;
   logprint(&amp;quot;This never gets printed&amp;quot;)      &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
if(point:distanceTo(Point(1, 1) &amp;lt; 5) then       &lt;br /&gt;
   logprint(&amp;quot;This always gets printed&amp;quot;)      &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Here we'll use a point to represent a velocity, which has x &amp;amp; y components&lt;br /&gt;
local xspeed = 10&lt;br /&gt;
local yspeed = 15&lt;br /&gt;
local velocity = Point(xspeed, yspeed)&lt;br /&gt;
logprint(&amp;quot;Speed = &amp;quot; .. velocity:len())&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ItemTypes ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;ShipType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;RobotType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;BulletType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;MineType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SpyBugType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NexusFlagType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;RobotType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;TeleportType&amp;lt;/b&amp;gt; (not yet fully implemented)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SpeedZoneType&amp;lt;/b&amp;gt; (not yet fully implemented)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;AsteroidType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;TurretType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ForceFieldProjectorType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;TestItemType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;FlagType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SoccerBallItemType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ResourceItemType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Things that are not really items ==&lt;br /&gt;
&amp;lt;u&amp;gt;Polygonal-like&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;BotNavMeshZoneType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NexusType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;GoalZoneType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;LoadoutZoneType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Wall-like&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;BarrierType&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ForceFieldType&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>UnknownJoe</name></author>	</entry>

	<entry>
		<id>http://bitfighter.org/wiki/index.php/Level_file_syntax</id>
		<title>Level file syntax</title>
		<link rel="alternate" type="text/html" href="http://bitfighter.org/wiki/index.php/Level_file_syntax"/>
				<updated>2010-02-17T22:25:54Z</updated>
		
		<summary type="html">&lt;p&gt;UnknownJoe: New page: UnknownJoe:  List of valid game objects/settings and their use. N means that the value is unknown.  LevelName &amp;lt;Text&amp;gt;    Defines the name of the level. LevelDescription &amp;lt;Text&amp;gt;    Defines th...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;UnknownJoe:&lt;br /&gt;
&lt;br /&gt;
List of valid game objects/settings and their use.&lt;br /&gt;
N means that the value is unknown.&lt;br /&gt;
&lt;br /&gt;
LevelName &amp;lt;Text&amp;gt;&lt;br /&gt;
   Defines the name of the level.&lt;br /&gt;
LevelDescription &amp;lt;Text&amp;gt;&lt;br /&gt;
   Defines the description of the level that is shown when the level starts.&lt;br /&gt;
LevelCredits &amp;lt;Text&amp;gt;&lt;br /&gt;
   Defines the credits of the level that is shown when the level starts.  If you &lt;br /&gt;
   created the map, put your name here.  If you used someone else's stuff for your &lt;br /&gt;
   level, put them here also.&lt;br /&gt;
GridSize &amp;lt;Number [1,N]&amp;gt;&lt;br /&gt;
   Defines the scale of the level.  255 is the new default, 300 is the old &lt;br /&gt;
   default.&lt;br /&gt;
MinPlayers &amp;lt;Integer [1,N]&amp;gt;&lt;br /&gt;
   Defines when the minimum amount of players for the level to be automatically &lt;br /&gt;
   selected by the server.  If the amount of players on the server is lower than &lt;br /&gt;
   this number, this map will not be chosen automatically.&lt;br /&gt;
MaxPlayers &amp;lt;Integer [1,N]&amp;gt;&lt;br /&gt;
   Defines when the maximum amount of players for the level to be automatically &lt;br /&gt;
   selected by the server.  If the amount of players on the server is higher than&lt;br /&gt;
   this number, this map will not be chosen automatically.&lt;br /&gt;
Team &amp;lt;Text - Name&amp;gt; &amp;lt;Number [0,1] - Red&amp;gt; &amp;lt;Number [0,1] - Green&amp;gt; &amp;lt;Number [0,1] - Blue&amp;gt;&lt;br /&gt;
   Defines a team.  The team number is determined by the order they are in.  Name &lt;br /&gt;
   is the name of the team.  Red, Green, and Blue determine the color of the team.&lt;br /&gt;
BarrierMaker &amp;lt;Integer [1,N] - Thickness&amp;gt; &amp;lt;Integer - Point1X&amp;gt; &amp;lt;Integer - Point2Y&amp;gt;  ...&lt;br /&gt;
   Creates a wall.  Thickness determines how wide the wall will be.  The points &lt;br /&gt;
   after that determine where it is and where it goes to.&lt;br /&gt;
LoadoutZone &amp;lt;Integer [-2,# of teams-1] Team, &amp;lt;Integer - Point1X&amp;gt; &amp;lt;Integer - Point2Y&amp;gt; ...&lt;br /&gt;
   Creates a loadout zone of the specified team Team.  The points after that &lt;br /&gt;
   determine the boundaries of the zone.&lt;br /&gt;
Speedzone &amp;lt;Integer - PositionX&amp;gt; &amp;lt;Integer - PositionY&amp;gt; &amp;lt;Integer - DestX&amp;gt; &amp;lt;Integer &lt;br /&gt;
- DestY&amp;gt;&lt;br /&gt;
   Creates a speedzone at the specified position that points to the specified&lt;br /&gt;
   destination.&lt;br /&gt;
Teleporter &amp;lt;Integer - PositionX&amp;gt; &amp;lt;Integer - PositionY&amp;gt; &amp;lt;Integer - DestX&amp;gt; &amp;lt;Integer - DestY&amp;gt;&lt;br /&gt;
   Creates a teleporter at the specified position that sends you to the specified&lt;br /&gt;
   destination.&lt;br /&gt;
Turret &amp;lt;Integer [-2,# of teams-1] Team&amp;gt; &amp;lt;Integer - PositionX&amp;gt; &amp;lt;Integer - PositionY&amp;gt;&lt;br /&gt;
   Creates a turret at the specified position on team Team.&lt;br /&gt;
ForceFieldProjector &amp;lt;Integer [-2,# of teams-1] Team&amp;gt; &amp;lt;Integer - PositionX&amp;gt; &amp;lt;Integer - PositionY&amp;gt;&lt;br /&gt;
   Creates a force field at the specified position on team Team.&lt;br /&gt;
RepairItem &amp;lt;Integer - PositionX&amp;gt; &amp;lt;Integer - PositionY&amp;gt;&lt;br /&gt;
   Creates a health pack at the specified position.&lt;br /&gt;
FlagItem &amp;lt;Integer [-2,# of teams-1] Team&amp;gt; &amp;lt;Integer - PositionX&amp;gt; &amp;lt;Integer - PositionY&amp;gt;&lt;br /&gt;
   Creates a flag at the specified position that belongs to team Team.&lt;br /&gt;
Spawn &amp;lt;Integer [0,# of teams-1] Team&amp;gt; &amp;lt;Integer - PositionX&amp;gt; &amp;lt;Integer - PositionY&amp;gt;&lt;br /&gt;
   Creates a spot where the players will spawn upon death.&lt;br /&gt;
SpyBug &amp;lt;Integer [0,# of teams-1] Team&amp;gt; &amp;lt;Integer - PositionX&amp;gt; &amp;lt;Integer - PositionY&amp;gt;&lt;br /&gt;
   Creates a spybug at the specified position that belongs to team Team.&lt;/div&gt;</summary>
		<author><name>UnknownJoe</name></author>	</entry>

	</feed>