Can't catch an inventory drop with SpecialDropAction?

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Can't catch an inventory drop with SpecialDropAction?

Re: Can't catch an inventory drop with SpecialDropAction?

by Player701 » Mon Nov 13, 2023 4:24 am

It looks like SpecialDropAction is only used by monster drops (e.g. A_DropItem).

Re: Can't catch an inventory drop with SpecialDropAction?

by Graf Zahl » Sun Nov 12, 2023 11:18 pm

That's not what this function is for. What it does is to execute a special action that happens instead of dropping the item.

Re: Can't catch an inventory drop with SpecialDropAction?

by Jarewill » Sun Nov 12, 2023 6:51 pm

To me it looks like the function is bugged, perhaps report it to the devs.
In the meantime you can override CreateTossable instead:

Code: Select all

	Override Inventory CreateTossable(int amt){
		console.printf("A");
		Return null; //Don't drop anything
	}

Can't catch an inventory drop with SpecialDropAction?

by Sir Robin » Sun Nov 12, 2023 6:36 pm

I want an inventry item to catch a drop call but not actually drop (it's a master that can't be dropped but when dropped it will drop a child item)
I thought SpecialDropAction would do that, but it never fires:

Code: Select all

class invTest : inventory
{
    default{+inventory.invbar;inventory.icon "UNKNA0";}
    states{spawn: UNKN A -1; stop;}

    override bool SpecialDropAction (Actor dropper)
    {
        console.printf(level.time..": "..GetCharacterName()..": Dropped");
        return true;
    }
}
Do I need to turn on a flag somewhere to get that to work or what? Or is there another way to do what I want?

Top