Boogieman Routine Explanation:
 
This routine is only called when Torque knows (from having used the system variables) that there is an enemy directly ahead of it.

It does a long range scan and if an enemy is found, it launches a missile. There is then a goto which jumps to the missile routine. However, this is only performed if a missile is ready to be fired. If a missile is ready, then this means that the missile launched the line before must no longer be active. i.e. it exploded in the same click as it was fired. In this case the chances are that the missile hit the enemy (it didn't have long to get out of the way) so Torque jumps to the missile routine to launch another one.

If the scan finds a barrier or a mine, then there is a chance that the enemy is directly behind it, in which case Torque can frag the enemy by launching a missile into the obstruction, so the program jumps to a routine to check for this possibility.

Next, if a flag is found, then Torque will jump to the flag-retrieval routine.
 
The rest of the routine is for the situation where the enemy will probably move out of Torque's line of fire, but can still be fragged using a wall behind it.
 
the coordinates of the space directly behind the enemy are calculated using a fiendishly complicated piece of math. Then this square is gps-scanned to find out whether it can be used to frag the enemy. If it can, then Torque jumps to a routine to frag the enemy.

If it is not possible to frag the enemy, then Torque turns to one side, and moves out of the line of fire.

Next, there are three 'goto' statements for situations where Torque is either still on the same axis as an enemy or there is an imbound missile. If none of these conditions are met, Torque jumps to a main routine which turns it towards the nearest enemy.