// ZZ> This function makes an item fall to the floor when spawned
IfSpawned				//
  MakeAmmoKnown				  //
  tmpargument = ACTIONJB		  //
  DoAction				  //
  KeepAction				  //
  MakeCrushValid
IfCrushed
  tmpx = selfx
  tmpy = selfy
  tmpdistance = selfz
  tmpargument = 1
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  SpawnExactParticle
  GoPoof
  tmpargument = 2
  SendMessageNear
IfDropped				// Make it lie on floor
  KeepAction				  //
IfUsed					// Drop shells or make a click sound
  IfAmmoOut
    tmpargument = 1
    PlaySound
  Else
    tmpx = selfammo & 1
    tmpy = 0
    IfXIsMoreThanY			//Eg. every 2 shots
      SetTargetToWhoeverIsHolding
      tmpargument = targetint + targetdex
      tmpargument = tmpargument > 8
      tmpargument = 100 - tmpargument
    Else
      tmpargument = 0
    SetReloadTime
    tmpx = selfx
    tmpy = selfy
    tmpdistance = selfz
    tmpargument = 4
    SpawnExactParticle
    IfStateIs0
      tmpargument = 3
      PlaySound
      tmpargument = 1
    Else
      tmpargument = 4
      PlaySound
      tmpargument = 0
    SetState
    tmpargument = [WAKE]
    tmpdistance = [WAKE]
    OrderSpecialID
IfHitGround				// Play the drop sound
  tmpargument = 0			  //
  PlaySound				  //
IfGrabbed				// Tell them what they've won...
  SetTargetToWhoeverIsHolding		  //
  IfTargetIsAPlayer			  //
    tmpargument = 0			  //
    IfAmmoOut				  //
      tmpargument = 1			    //
    SendMessageNear			  //
End					// All done
