Unsetting flags inside A_Explode

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!)
Post Reply
User avatar
neoworm
Posts: 1743
Joined: Fri Sep 23, 2005 9:17 am
Location: Czech Republic

Unsetting flags inside A_Explode

Post by neoworm »

I have a problem, I want to enforce no vertical thrust from certain explosions independently of how compat_explode1 is set. But I don't know how to force in the flag inside A_Explode call. I tried this but it doesn't work.

Code: Select all

MEXP G 1 bright A_Explode(64, 128, XF_HURTSOURCE | ~XF_THRUSTZ, true);
Is it even possible?
User avatar
phantombeta
Posts: 2090
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Unsetting flags inside A_Explode

Post by phantombeta »

It's simply set as the default value of the flags argument, so you just need to not pass the flag. (If you didn't want to pass in any other flags, you'd put in 0 instead)
User avatar
neoworm
Posts: 1743
Joined: Fri Sep 23, 2005 9:17 am
Location: Czech Republic

Re: Unsetting flags inside A_Explode

Post by neoworm »

That still throws me into stratosphere, I tried. It gets overriden by the compat option. I kinda need to enforce it not to use the Zthrust when exploding.
Post Reply

Return to “Scripting”