IfKilled				// This reduces the height of the char
  IfTargetIsOnHatedTeam			  // Final words
    tmpargument = 0			    //
    SendMessageNear			    //
  tmpargument = 30			  // Dead height
  SetBumpHeight				  //
  tmpargument = 1			  // Sound
  PlaySound				  //
IfAttacked				// Don't take kindly to attackers
  SetTargetToWhoeverAttacked		  //
    tmpargument = 0			    // Sound
    PlaySound				    //
IfBumped				// Attack whoever it bumped
  SetTargetToWhoeverBumped		  //
  IfTargetIsOnHatedTeam			  // Make sure it's an enemy
    tmpargument = LATCHLEFT		    // Bite 'em
    PressLatchButton			    //
  Else					  // Scooch around friendly
    tmpx = rand & 1023 + targetx - 512      //
    tmpy = rand & 1023 + targety - 512      //
    ClearWaypoints			    //
    AddWaypoint				    //
    SetTargetToOldTarget		    //
IfTimeOut				// This is done every so often
  SetTargetToWideEnemy			  // Look for enemies
    tmpargument = rand & 1 + 2
    PlaySound

    tmpx = targetx
    tmpy = targety
    tmpdistance = 300
    tmpturn = selfturn
    Compass
    tmpturn = targetturnto
    tmpdistance = 300
    Compass
  Else					  // Wander around home position
    tmpx = 32*128
    tmpy = 30*128
  ClearWaypoints			  //
  AddWaypoint				  //
  tmpargument = rand & 63 + 20		  // Wait a while and try again
  SetTime				  //

End					// Finished with this character
