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?
Enemy projectiles not spawning
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.
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.
-
- Posts: 5039
- Joined: Sun Nov 14, 2010 12:59 am
Re: Enemy projectiles not spawning
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 wrote:only seems to affect custom maps
Re: Enemy projectiles not spawning
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.
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.
Re: Enemy projectiles not spawning
After some fiddling around, the issue seems to be these two lines:
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.
Code: Select all
TROO A 0 Thing_Hate(1,3,3)
TROO G 6 A_MonsterRefire(130, "See")
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.
Re: Enemy projectiles not spawning
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.Turret49 wrote:After some fiddling around, the issue seems to be these two lines:Commenting out either of those let the monster behave normally.Code: Select all
TROO A 0 Thing_Hate(1,3,3) TROO G 6 A_MonsterRefire(130, "See")
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.
Thank you for your help.
