Actor Flare : CustomInventory
{
  Radius 4
  Height 18
  +INVENTORY.INVBAR
  Inventory.InterHubAmount 10
  Inventory.MaxAmount 10
  Inventory.Icon "FLARE0"
  Inventory.PickupMessage "You picked up a flare."
  States
  {
  Spawn:
    FLAR D -1
    Stop
  Use:
    TNT1 A 1 A_SpawnItemEx ("ActiveFlare", 56, 0, 28, 0, 0, 0, 0, 1)
    Stop
  }
}

Actor ActiveFlare //You can give this a DoomEdNum, to place it in a map editor
{
  Radius 22
  Height 11
  States
  {
  Spawn:
    FLAR A 0 Bright
    FLAR A 0 Bright A_PlaySound("Flare/Light")
    FLAR A 0 Bright A_PlaySoundEx("Flare/Loop", "SoundSlot7", 1, -1)
    FLAR AB 1 Bright
    Goto Spawn+3
  }
}

Actor FlareBox : CustomInventory
{
  Radius 28
  Height 16
  Inventory.PickupMessage "You picked up a box of flares."
  States
  {
  Spawn:
    FLAR C -1
    Stop
  Pickup:
    TNT1 A 1 A_GiveInventory ("Flare", 5)
    Stop
  }
}
