How to remove MELEE from a monsters attack?

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

How to remove MELEE from a monsters attack?

Post by Hidden Hands »

If I have replaced for example the Baron of Hell with a new monster that does NOT have a melee attack, how can I make it so it doesn't do one? Because currently it reverts to the BARON OF HELL sprites to do a melee attack which one it shouldnt have and second when it does do it, it changes into the previous monster.

How can I fix it please?

Thanks in advance.
Blue Shadow
Posts: 5022
Joined: Sun Nov 14, 2010 12:59 am

Re: How to remove MELEE from a monsters attack?

Post by Blue Shadow »

Add this to your monster:

Code: Select all

Melee:
    Stop
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England

Re: How to remove MELEE from a monsters attack?

Post by Hidden Hands »

Blue Shadow wrote:Add this to your monster:

Code: Select all

Melee:
    Stop
Thank you!
User avatar
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: How to remove MELEE from a monsters attack?

Post by Ichor »

Or you could do this:

Code: Select all

Melee:
    Goto Missile
This way, it will use the missile attack even when it's in melee range.
User avatar
Hidden Hands
Posts: 1053
Joined: Tue Sep 20, 2016 8:11 pm
Location: London, England

Re: How to remove MELEE from a monsters attack?

Post by Hidden Hands »

Thank you also! Great help everyone, thanks.
User avatar
Hexereticdoom
Posts: 660
Joined: Thu Aug 08, 2013 1:30 pm
Graphics Processor: nVidia with Vulkan support
Location: Spain

Re: How to remove MELEE from a monsters attack?

Post by Hexereticdoom »

This way has also the same effect:

Code: Select all

Melee:
Missile:
...
Decorate code is pretty flexible, as you can see... =:)

Return to “Scripting”