Friendly Decorate Error

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Scuba Steve
Posts: 1060
Joined: Sat Mar 27, 2004 8:56 pm

Friendly Decorate Error

Post by Scuba Steve »

http://www.doomworld.com/gbd2/files/test.wad

To see how this doesn't work correctly, load up this wad and then summon from the console "HelperImp". Shoot the imp so it dies and it should fire a fireball. Now... try this in 2 situations, with enemies around and without. If there are no enemies nearby the imp shoots at you (which is to be expected) and he shows his death frames. However, should there be nearby enemies, he fires his shot at the nearest one (again to be expected) but he disappears and never shows his death frames.

Is it something I'm doing or is it a bug with Zdoom. I think it's correct, I seriously doubt the imp is supposed to just disappear if it fires at another enemy.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49227
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Remove the A_Look from the death state. That doesn't work because it tries to enter the non existing see state.
Scuba Steve
Posts: 1060
Joined: Sat Mar 27, 2004 8:56 pm

Post by Scuba Steve »

If A_Look is removed, then the monster no longer targets other enemies and only fires at the player.
User avatar
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm
Contact:

Post by Daniel »

I faced a problem like this a couple of days ago... my conclusion is that you can't use A_Look, or they will lose the +FRIENDLY flag. Just step straight to A_Chase.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49227
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Scuba Steve wrote:If A_Look is removed, then the monster no longer targets other enemies and only fires at the player.

Then you have to define a valid see state somewhere (preferably directly after A_Look.) Without it it doesn't work.
Scuba Steve
Posts: 1060
Joined: Sat Mar 27, 2004 8:56 pm

Post by Scuba Steve »

This still doesn't make any sense. Shouldn't a stationary friendly be just as simple to create as a moving one? Why is this so difficult?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49227
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Because A_Look jumps to the see state if it finds a target to attack. You are using the function in a place where it doesn't belong so you shouldn't be surprised that it doesn't work.
Scuba Steve
Posts: 1060
Joined: Sat Mar 27, 2004 8:56 pm

Post by Scuba Steve »

So is ZDoom capable of making htis or not? Is it possible to make a friendly enemy that when they are attacked by YOU they fire a shot at the nearest ENEMY and die?
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

Code: Select all

	States
	{
		Spawn:
			TROO A 8
			Loop		
		Death:
			TROO B 1 A_Look
			Loop
		See:
			TROO B 0 A_CustomMissile ("ImpShot", 32, 0, 0, 0)
			TROO B 0 A_Fall
			TROO B 0 A_Scream
			TROO MOPQRSTU 2
			TROO U 2
			Goto Death + 11
	}
Would this work? What were you trying to do with the loop at the last frame of the death sequence? If you were trying to make the corpse, just use a duration of -1 for the last frame. Your imp will probably just sit in place since it doesn't have a walking sequence defined and doesn't inherit one, so you could use the see state for the fireball.

EDIT: No it doesn't. The fireball just shoots right back at me. The fireballs shoot at the enemy if you put MONSTER in there. One fireball shoots at you while the other shoots at the enemy. Why two?
Scuba Steve
Posts: 1060
Joined: Sat Mar 27, 2004 8:56 pm

Post by Scuba Steve »

I just tried it and you're right it shoots two, and I can't figure out why.
Scuba Steve
Posts: 1060
Joined: Sat Mar 27, 2004 8:56 pm

Post by Scuba Steve »

So Graf, any word now on why this latest method fires 2 projectiles and why one seeks you while the other seeks the closest enemy?
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

I'm experiencing some similar problems with my friendly weapon. I tried the friendly aiming thing by making something like the doom 3 bfg with the laser that shoots out at nearby enemies while the projectile is firing and making it so the projectile can be shot down without triggering the bfg wave. Unfortunately, the bfg shot cannot be shot down - attacks just go right through. The lasers also act strangely. They aim at nearby enemies, but they just pass right through them without harm. However, they can hit enemies that are further away from the projectile and happen to be in the path of the lasers. They also hit the player if the player happens to be in the path. I noticed that the lasers seem to be owned by the nearby monster that happens to be targeted by them. What I mean is that when the player is killed by a laser, the obituary displayed says that he was killed by the monster that the laser was supposed to be aiming at. Monsters have also started infighting as a result of the laser passing through the targeted enemy and striking the one behind it. This also explains why they pass through the targeted nearby monsters without harm. If there are no targets around, the lasers simply shoot at the player once the laser spawners are awakened.
Spoiler:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49227
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Remove the NOBLOCKMAP flag from the shootable missile. That flag prevents any passive collision detection which includes being hit by another weapon.

The rest is just a result of doing something unsupported. To do this cleanly you'd have to program it in C++ to handle all the dependencies properly. I won't change A_CustomMissile because too many WADs already depend on the current behavior.
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

Could there be a new function or monster seeking flag for projectiles?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49227
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Fixed in 2.0.99
Post Reply

Return to “Closed Bugs [GZDoom]”