Enemy projectiles not spawning

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
OmDr
Posts: 12
Joined: Tue Jul 22, 2014 11:26 am

Enemy projectiles not spawning

Post by OmDr »

I'm having a strange issue;
A custom monster will sometimes fail to create missiles during its missile state, despite the sound and animation going through.
This is the monster:
http://pastebin.com/sC5vTUt6

And this is the Missile:
http://pastebin.com/xEJjX2ze

This issue does not occur on vanilla maps (when summoned or spawned), and only seems to affect custom maps (both maps I did and didn't create). Would anyone know what I am doing wrong?
Blue Shadow
Posts: 5039
Joined: Sun Nov 14, 2010 12:59 am

Re: Enemy projectiles not spawning

Post by Blue Shadow »

OmDr wrote:only seems to affect custom maps
If that's the case, then uploading a test WAD which demonstrates the problem would be a good idea, as it's easier to debug that way.
OmDr
Posts: 12
Joined: Tue Jul 22, 2014 11:26 am

Re: Enemy projectiles not spawning

Post by OmDr »

Ok, I have uploaded an example .wad here
http://www.mediafire.com/?7odjy5emod1n1me

There are two monsters to test it on: one you'll see when you start, and another down on the lower floor. I may have put it on a bad spot, so if the upper one gets stuck you'll have to find the lower one.
Watch the monster shoot at you for a little bit, you'll start to notice it doing the animation but no attack happening.
Turret49
Posts: 92
Joined: Sat Aug 29, 2015 1:40 pm

Re: Enemy projectiles not spawning

Post by Turret49 »

After some fiddling around, the issue seems to be these two lines:

Code: Select all

TROO A 0 Thing_Hate(1,3,3)

TROO G 6 A_MonsterRefire(130, "See")
Commenting out either of those let the monster behave normally.
The monster seems to be acting like it has two targets at once due to Thing_Hate, so A_MonsterRefire is checking sight for a non-existant target and causing the monster to stop attacking. For some reason this is making the monster further freak out and attempt to also attack the target that doesn't exist, thus spawning nothing. This sounds more like a bug than a mistake on your part.
OmDr
Posts: 12
Joined: Tue Jul 22, 2014 11:26 am

Re: Enemy projectiles not spawning

Post by OmDr »

Turret49 wrote:After some fiddling around, the issue seems to be these two lines:

Code: Select all

TROO A 0 Thing_Hate(1,3,3)

TROO G 6 A_MonsterRefire(130, "See")
Commenting out either of those let the monster behave normally.
The monster seems to be acting like it has two targets at once due to Thing_Hate, so A_MonsterRefire is checking sight for a non-existant target and causing the monster to stop attacking. For some reason this is making the monster further freak out and attempt to also attack the target that doesn't exist, thus spawning nothing. This sounds more like a bug than a mistake on your part.
Commenting out the thing_hate part does indeed let it function properly again. Frustrating, but it isn't required as long as they have QUICKTORETALIATE.
Thank you for your help. :)
Locked

Return to “Editing (Archive)”