// ZZ> This function makes an item fall to the floor when spawned
IfSpawned				//
  MakeAmmoKnown				  //
  tmpargument = ACTIONJB		  //
  DoAction				  //
  KeepAction				  //
  MakeCrushValid
  tmpargument = 0
  IfContentIs
    tmpargument = 0  			// Off
    SetState
  Else
    tmpargument = 1  			// On
    SetState
    tmpargument = 0			    
    tmpdistance = SPAWNLAST		  // Model vertex to attach to
    SpawnAttachedParticle			  //
  tmpargument = 250
  SetTime

IfCrushed
  tmpx = selfx
  tmpy = selfy
  tmpdistance = selfz
  tmpargument = 5
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  GoPoof
  tmpargument = 1
  SendMessageNear

IfDisaffirmed
  tmpargument = 1			  //
  tmpdistance = rand & 2047 + 10000	  //
  PlaySound				  //
  tmpargument = 0  			// Off
  SetState

IfTakenOut
  tmpargument = 1			  //
  tmpdistance = rand & 2047 + 10000	  //
  PlaySound				  //
  tmpargument = 0  			// Off
  SetState

IfDropped				// Make it lie on floor
  KeepAction				  //

IfHitGround				// Make a sound
  tmpargument = 0			  //
  tmpdistance = rand & 2047 + 10000	  //
  PlaySound				  //

IfGrabbed				// Tell them what they've won...
  SetTargetToWhoeverIsHolding		  //
  IfTargetIsAPlayer
    tmpargument = 0			  //
    SendMessageNear			  //


IfUsed
  IfStateIs0
    IfAmmoOut
      tmpargument = 2			  //
      SendMessageNear			  //
    Else
      tmpargument = 1  			// On
      SetState
      tmpargument = 0			    // Yes
      tmpdistance = SPAWNLAST		  // Model vertex to attach to
      SpawnAttachedParticle			  //
//      tmpargument = 100  // Two seconds
//      SetReloadTime
      tmpargument = 200
      SetTime
  Else
    tmpargument = 0  			// Off
      SetState
      DisaffirmCharacter
//      tmpargument = 100  // Two seconds
//      SetReloadTime

IfTimeOut
  IfStateIs1
    CostAmmo
    IfAmmoOut
      tmpargument = 0  			// Off
      SetState
      DisaffirmCharacter
      tmpargument = 2			  //
      SendMessageNear			  //
    tmpargument = 250
    SetTime


End					// All done

