(Decorate) How to make temporary armor?

Sat Sep 18, 2021 3:57 am

(Sorry for my english, I russian) I make lava suit, and when player puck up this suit he give special armor which does not protect against any damage other than fire and lava. And i have problems with this armor, I need to make it temporary, but I don't know how,
if in lava suit make this:
  PickUp:
     TNT1 A 0 A_GiveInventory("LavaSuit_Armor")
     TNT1 A 2100
     TNT1 A 0 A_TakeInventory("LavaSuit_Armor")
     Stop
still doesn't work. Thank you in advance

Full code:
ACTOR LavaSuit : CustomInventory 32602
{
   Height 46
   Radius 24
   +COUNTITEM
   +NOGRAVITY
   +INVENTORY.AUTOACTIVATE
   +INVENTORY.ALWAYSPICKUP
   Inventory.PickupMessage "$o Got a LAVA SUIT!"
   States
   {
   Spawn:
      LVSU A -1
      Loop
   PickUp:
      TNT1 A 0 A_GiveInventory("LavaSuit_Armor")
      Stop
   }
}

ACTOR LavaSuit_Armor : BasicArmorPickup
{
   Armor.Savepercent 0.00001
   Armor.Saveamount 100
   +COUNTITEM
   +INVENTORY.ALWAYSPICKUP
   DamageFactor "Lava", 0.0
   DamageFactor "Fire", 0.0
}

Re: (Decorate) How to make temporary armor?

Sat Sep 18, 2021 6:22 am

It sounds more so like you want to use PowerProtection instead of armor.
PowerProtection is a powerup that lasts a certain amount of time and protects you from given damage types.

Re: (Decorate) How to make temporary armor?

Sat Sep 18, 2021 7:33 am

Jarewill wrote:It sounds more so like you want to use PowerProtection instead of armor.
PowerProtection is a powerup that lasts a certain amount of time and protects you from given damage types.


Thank you very much for your help