Do weapons have a way to modify their drop action?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Boondorl
Posts: 151
Joined: Wed Jul 11, 2018 10:57 pm

Do weapons have a way to modify their drop action?

Post by Boondorl »

I have a couple custom weapons that inherit from DoomWeapon and being able to modify what they do on drop via Decorate would fix a few issues I'm having related to it.
User avatar
Caligari87
Admin
Posts: 6191
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Re: Do weapons have a way to modify their drop action?

Post by Caligari87 »

Not in DECORATE without (I'm guessing) a significant amount of hackery. If you're willing/able to move to zscript, it's possible to override the CreateTossable function in any class that has Inventory as the parent class (including DoomWeapon).

8-)
Boondorl
Posts: 151
Joined: Wed Jul 11, 2018 10:57 pm

Re: Do weapons have a way to modify their drop action?

Post by Boondorl »

Normally that would be the simplest solution, but unfortunately I want to keep it online compatible and Zandronum 3.0 doesn't have zscript support yet (or maybe ever). I'm sure I can figure out a way to rework it and avoid the issue. Thanks for the help though!

Return to “Scripting”