Melee blocking line?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, 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.
Post Reply
User avatar
Ravick
Posts: 2002
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Melee blocking line?

Post by Ravick »

Is that a (n official) way to make a line block melee attacks? Or better, to make a monster not start its melee sequence when player is on the other side of said line? We have hitscan, sound, projectile, player movement, monster movement blocking, etc... is it possible to make with melee?
Epōllon
Posts: 3
Joined: Thu Jul 12, 2018 4:24 pm

Re: Melee blocking line?

Post by Epōllon »

If you are talking about a single linedef, you can use Block Everything to block melee included, however if you want to only block melee you can use acs as well. Make a sector next to the wall and use the map spots Actor Leaves Sector and Actor Enters Sector to activate SetActorProperty scripts for APROP_MeleeRange of the things behind the wall.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Melee blocking line?

Post by Arctangent »

Monster melee attacks ( and only monster melee attacks - player melee attacks are just regular ol' hitscans with tiny range ) depend entirely on line of sight. So, if you set a line to block line of sight ( which can be done on its own in UDMF, but is also included in "block everything" if you're mapping for an ancient version of Skulltag for whatever reason ), then not only will the player not be melee'd while that kind of line is between them and a monster, but the attack will also "miss" if it was already started but didn't get to the attack codepointer until after the player already moved behind the line.
User avatar
Ravick
Posts: 2002
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: Melee blocking line?

Post by Ravick »

Thanks! :)
Post Reply

Return to “Mapping”