Remove +FLOATBOB on death?

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
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Remove +FLOATBOB on death?

Post by Hidden Hands »

I have a monster that uses the +Floatbob effect underthe monster in decorate. This is neccesary, since the monster is supposed to float and bob when on the prowl. However, upon being killed, the body continues to do this. How can I make the body stop floatbobbing upon death and just drop to the ground?

Thanks in advance.
User avatar
SanyaWaffles
Posts: 862
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: Remove +FLOATBOB on death?

Post by SanyaWaffles »

have you tried changing the flag?
User avatar
Player701
 
 
Posts: 1710
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Remove +FLOATBOB on death?

Post by Player701 »

To be precise:

Code: Select all

A_ChangeFlag("FlOATBOB", false)
or, if using ZScript:

Code: Select all

bFloatBob = false;
Note that if your monster can be resurrected, you should probably also enable the flag again somewhere in the monster's Raise state.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: Remove +FLOATBOB on death?

Post by Hidden Hands »

Thank you, much appreciated! This sorted it.
Post Reply

Return to “Scripting”