//------------------------------------------------------------------------------
// ZZ> Move around...  Start at state 0
IfTimeOut
  tmpx = rand & 63
  tmpy = 0
  IfXIsEqualToY
    tmpargument = 0
    PlaySound

  tmpx = rand & 511 - 256 + selfspawnx
  tmpy = rand & 511 - 256 + selfspawny
  ClearWaypoints
  AddWaypoint
  tmpargument = rand & 63 + 30
  SetTime

//------------------------------------------------------------------------------
IfBumped
  SetTargetToWhoeverBumped
  IfStateIs0
    tmpargument = 1
    SetState
    tmpargument = 0
    PlaySound
    IfTargetIsAPlayer
      tmpargument = [ELFF]
      IfTargetHasID
        tmpargument = rand & 3 + 1
        SendMessageNear

//------------------------------------------------------------------------------
// ZZ> Handle death by sending a message and other stuff
IfKilled
  SetTargetToWhoeverAttacked
  IfTargetIsSelf
    tmpargument = 4
  Else
    tmpargument = 0
  SendMessage
  
  tmpargument = TEAME
  TargetJoinTeam
  CallForHelp

  // Make the character body
  tmpargument = 45
  SetBumpHeight

//------------------------------------------------------------------------------
IfAttacked
  SetTargetToWhoeverAttacked
  tmpargument = TEAME
  TargetJoinTeam
  CallForHelp

//------------------------------------------------------------------------------
End
//------------------------------------------------------------------------------
