Get value of Inventory.Amount
Posted: Sat Mar 24, 2018 11:52 am
For debugging, I think its right word, reason I need to know how much health, armor and ammo exist on map at this moment, and what type, in case of ammo.
I try accessing its informations through event handler, like
But gzdoom print error "error while parsing, unknown identifier 'armor'/'inventory'/'save amount'/'amount'/'etc'..." with number of line where I use e.thing.Armor.SaveAmount/etc.
What I do wrong?
I try accessing its informations through event handler, like
Code: Select all
override void WorldThingSpawned(WorldEvent e)
{
if(e.thing is "BasicArmorPickup"){armor_amount += e.thing.Armor.SaveAmount); }
if(e.thing is "health"){health_amount += e.thing.Inventory.Amount); }
}
What I do wrong?