Jump to content
  • 0

MBF21 AddFlags/RemoveFlags Values


NinjaDelphox

Question

Perhaps I am blind, but it doesn't seem like the MBF21 Spec page has a list of what int values to put in for specific flags for the Add/RemoveFlags codepointer, does anyone have a list of all the different flags or know where I can find one? I'm trying to have an enemy set the noblockmap flag so it is invincible for a set amount of time, and then remove it. I tried looking at Judgment to see if it used the AddFlags and it did, but I only found two values but don't know what they do, and since I haven't actually played Judgment I don't know what enemy it is to go find out for myself.

And while I'm here asking this, is it also possible to force an enemy into its death state when a "heart" enemy dies? An example for this would be a Caco Demon dying which would then kill every Cyberdemon or something in the map. 

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

In DECOHack, you can just use flag names instead of the numerical values, as outlined in the help document:

 

Quote

Parameter values can also be a series of flags that get or'ed together. This
is useful for some functions that manipulate flags. A set of supported flags 
can be combined via the PIPE operator (or pluses):

 

    A_AddFlags(SOLID | DROPPED, 0)
    A_AddFlags(SOLID + DROPPED, 0)

 

Also, similarly, to force DECOHack to interpret an expression as a flag 
expression, prefix it with the "flags" keyword:

 

    A_AddFlags(flags SOLID | DROPPED, 0)

 

If you want to make something invincible though, I'd recommend removing the SHOOTABLE flag instead.

 

3 hours ago, NinjaDelphox said:

And while I'm here asking this, is it also possible to force an enemy into its death state when a "heart" enemy dies? An example for this would be a Caco Demon dying which would then kill every Cyberdemon or something in the map. 

 

I don't think it's possible in a general fashion, i.e. having the monsters roam about freely and have this effect work. If all of them were stationary it'd be easy to spawn short lived things calling A_RadiusDamage for a tic or two to desired locations on the death of the "heart". If only the monsters being killed were stationary, it'd need a more hacky solution (unfortunately, linking thing death to sector actions via LineEffect is fundamentally broken so you'd have to approach it in a different way). But afaik in general, making any thing die on the death of another would require the thing's position to be known.

Edited by Aurelius

Share this post


Link to post
  • 0
20 minutes ago, NinjaDelphox said:

So I got doomtools installed, but how do you actually use decohacked?

You can follow the instructions in this post. They're made for DSDHacked format, but in your case the only difference is that you write #include <mbf21>

instead at the beginning of your source file.

 

DoomTools does have a neat GUI nowadays, but it requires you to set up a DoomMake project even if you're only working with DECOHack. So if you want just that for now, you can use the method explained in the post I linked above.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...