How to remove Cacodemon's floating abilities

Discuss all aspects of editing for ZDoom.
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.

How to remove Cacodemon's floating abilities

Postby Hidden Hands » Sat Sep 23, 2017 3:53 pm

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 allExpand view
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?
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: How to remove Cacodemon's floating abilities

Postby Blue Shadow » Sat Sep 23, 2017 4:30 pm

If it's not meant to be a cacodemon and has its own code, then don't inherit from the Cacodemon class.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010

Re: How to remove Cacodemon's floating abilities

Postby Hidden Hands » Sat Sep 23, 2017 5:54 pm

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?
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: How to remove Cacodemon's floating abilities

Postby Blue Shadow » Sat Sep 23, 2017 7:44 pm

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 allExpand view
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.
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010

Re: How to remove Cacodemon's floating abilities

Postby Nevander » Sun Sep 24, 2017 4:26 pm

Code: Select allExpand view
ACTOR LazyCacodemon : Cacodemon REPLACES Cacodemon
{
   -FLOAT
   -NOGRAVITY
}
Nevander
Banned User
 
Joined: 06 Jan 2014

Re: How to remove Cacodemon's floating abilities

Postby Hidden Hands » Sun Sep 24, 2017 11:27 pm

Thank you both so much.
User avatar
Hidden Hands
Deadite
 
Joined: 20 Sep 2016
Location: London, England

Re: How to remove Cacodemon's floating abilities

Postby Jekyll Grim Payne » Mon Sep 25, 2017 1:39 am

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.
User avatar
Jekyll Grim Payne
 
Joined: 21 Jul 2008


Return to Editing (Archive)

Who is online

Users browsing this forum: Yandex [Bot] and 1 guest