Enemies on small ledges or plinths are useless?

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:

Enemies on small ledges or plinths are useless?

Post by Hidden Hands »

I have no idea how to fix this bug, but in my second MAP02 there are these tall plinths that stand at about 200 in height and on each one is a monster. The problem is, when the game starts they just walk around slowly doing nothing but making their ACT sound until you shoot them, and then they just move around faster on the spot. They don't shoot or anything. The plinths are designed to be a good sniping spot for enemies but they are completely useless enemies up there. Any advice on how to fix this?

I'm using DOOM in ZDOOM (UDMF) format and GZDOOM Builder.

Thanks in advance.
User avatar
Rachael
Posts: 13965
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Enemies on small ledges or plinths are useless?

Post by Rachael »

1) The enemies need room to move around.
2) Having a ledge that is the width of the enemy's radius is not enough - it needs to be slightly wider.
3) Remember that enemies are squares on the map, no matter what direction they are facing. Enter the console and set "am_cheats 3" and then look at them closely on the automap. That means if you're creating diagonal ledges, the ledge must be even wider.
User avatar
arookas
Posts: 265
Joined: Mon Jan 24, 2011 6:04 pm
Contact:

Re: Enemies on small ledges or plinths are useless?

Post by arookas »

Taking a quick look at p_enemy.cpp, I think the problem lies with the internal step counter (AActor::movecount) used to randomly change directions while navigating. It appears monsters can only missile attack if the movecount is zero. As the monster is trying to navigate away from a steep ledge or constantly changing direction from not having very much room to move around, this causes the movecount to be non-zero almost all of the time; thus, your monster will almost never attack from afar (melee seems to be unaffected by movecount).

Like Eruanna said, try giving the monster more room (either by reducing the radius of the monster or increasing the plinth's radius) to move around so its movecount can reach zero more often.
User avatar
Nash
 
 
Posts: 17503
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Enemies on small ledges or plinths are useless?

Post by Nash »

This is why I love the open source ZDoom community. Learned, scientific answers instead of misleading guesswork. :D

I was very frustrated with this problem too and I resorted to make my monster do more A_Chase calls to shoehorn them to be more "aggressive" but of course that's a crap solution. Thanks Arookas. :D
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Enemies on small ledges or plinths are useless?

Post by Graf Zahl »

One of the nice things of scripting is that people can take this function and make all the changes they like to it to create different attack pattern - once everything relevant has been exported or exposed.
User avatar
Reactor
Posts: 2091
Joined: Thu Feb 03, 2011 6:39 pm
Location: Island's Beauty, Hungary

Re: Enemies on small ledges or plinths are useless?

Post by Reactor »

These are the cases when I prefer to use turrets and enemies with turret-like characteristics.
Locked

Return to “Editing (Archive)”