How to remove Cacodemon's floating abilities

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

How to remove Cacodemon's floating abilities

Post by Hidden Hands »

I have created a monster that is meant to replace the Cacodemon, but the problem is my new monster should not be able to float/fly. I used the code:

Code: Select all

ACTOR newmonster : Cacodemon replaces Cacodemon
but the monster still flies even though the new code says it should act more like the zombieman. How can I fix this? My monster keeps floating off into the air.

Thanks in advance.

In other words, how do I remove the MONSTER +FLOAT and +NOGRAVITY flags when using Cacodemon replaces Cacodemon?
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: How to remove Cacodemon's floating abilities

Post by Blue Shadow »

If it's not meant to be a cacodemon and has its own code, then don't inherit from the Cacodemon class.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: How to remove Cacodemon's floating abilities

Post by Hidden Hands »

Blue Shadow wrote:If it's not meant to be a cacodemon and has its own code, then don't inherit from the Cacodemon class.
Well I'm updating a mod that already has Cacodemon replacements, and I thought there must be a way to replace all the Cacos in a WAD without having to go in each individual map and change them one by one, surely?
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: How to remove Cacodemon's floating abilities

Post by Blue Shadow »

That has nothing to do with what I said. If your monster's code is self-contained, i.e it doesn't rely on the Cacodemon class's code, then don't inherit from the Cacodemon class.

Code: Select all

actor newmonster replaces Cacodemon
Anyway, to answer the question: to clear an actor flag, you precede the flag's name with a minus, e.g -SHOOTABLE.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: How to remove Cacodemon's floating abilities

Post by Nevander »

Code: Select all

ACTOR LazyCacodemon : Cacodemon REPLACES Cacodemon
{
	-FLOAT
	-NOGRAVITY
}
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England
Contact:

Re: How to remove Cacodemon's floating abilities

Post by Hidden Hands »

Thank you both so much.
User avatar
Jekyll Grim Payne
 
 
Posts: 1065
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: How to remove Cacodemon's floating abilities

Post by Jekyll Grim Payne »

Hidden Hands wrote: Well I'm updating a mod that already has Cacodemon replacements, and I thought there must be a way to replace all the Cacos in a WAD without having to go in each individual map and change them one by one, surely?
I may be misunderstanding, but if you're making a mod of a mod (i.e. that will be a separate file rather than an updated file of the original mod), and if the mod has its own monsters that replace Cacodemons (via "replaces Cacodemon"), then using another monster with the same method of replacement won't work (or rather it could... depending on the order that you run PWADs in...). You'd have to replace the monster that the original mod uses as a replacement.
Locked

Return to “Editing (Archive)”