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.

Remove +FLOATBOB on death?

Postby Hidden Hands » Wed Jun 02, 2021 9:58 pm

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
Hidden Hands
Cherub
 
Joined: 20 Sep 2016
Location: London, England
Discord: VGCtm
Operating System: Windows Vista/7/2008 32-bit

Re: Remove +FLOATBOB on death?

Postby SanyaWaffles » Thu Jun 03, 2021 12:01 am

have you tried changing the flag?
User avatar
SanyaWaffles
The Truth Will Set You Free
 
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Remove +FLOATBOB on death?

Postby Player701 » Thu Jun 03, 2021 12:15 am

To be precise:

Code: Select allExpand view
A_ChangeFlag("FlOATBOB", false)

or, if using ZScript:

Code: Select allExpand view
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
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Remove +FLOATBOB on death?

Postby Hidden Hands » Thu Jun 03, 2021 12:16 pm

Thank you, much appreciated! This sorted it.
User avatar
Hidden Hands
Cherub
 
Joined: 20 Sep 2016
Location: London, England
Discord: VGCtm
Operating System: Windows Vista/7/2008 32-bit


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests