EDIT: Still not sure why it's "drop"items, but I got this working:
Code: Select all
class InvReset:Inventory{
override void attachtoowner(actor other){
other.clearinventory();
//stolen from Ed the Bat's eventhandler in Blade of Agony
let drop=other.getdropitems();
if(drop){
for(dropitem di=drop;di;di=di.Next){
if(di.Name=='None')continue;
other.A_GiveInventory(di.Name,di.Amount);
}
}
goawayanddie();
}
}