Stop Shooting Each Other Dammit!

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Boingo the Clown
Posts: 102
Joined: Sat Dec 03, 2005 17:40
Location: North of New York, West of Montreal, East of Toronto, and South of Hell
Contact:

Stop Shooting Each Other Dammit!

Post by Boingo the Clown »

I have been switching my monster over from DEHackEd to DECORATE for the new version of my mod and it brings up a question.

Is it possible to get my monsters with scan line attacks (bullets) to stop shooting each other?

That is to say if there is another monster between itself and the player the monster will either not fire or its shot will have no effect on the other monster, or perhaps that it will even shoot through the other monster (without affecting it) and hit the player.

Does anyone know if this is possible?

The ZDooM wiki mentioned a flag "DesignatedTeam", but when I tried it it did not seem to work.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Stop Shooting Each Other Dammit!

Post by Gez »

You could use [wiki]A_WolfAttack[/wiki].
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Stop Shooting Each Other Dammit!

Post by Enjay »

If you just want to replicate the DEHACKED "Monsters Ignore Each Other" behaviour, you can use the MAPINFO "noinfighting" map peroperty.
User avatar
Rachael
Developer
Developer
Posts: 3651
Joined: Sat May 13, 2006 10:30

Re: Stop Shooting Each Other Dammit!

Post by Rachael »

I think he means a property like Half-Life monsters where the AI scans their hitscan lines before firing; if an ally is detected in the way the attack automatically fails and they move to a "safer" position to initiate the attack.

I've been meaning to replicate this behavior in A_Chase and submitting a code patch for it but I've been so busy I just never got around to it. This would be one of many steps in creating more intelligent monster behavior in Doom. Perhaps a good feature suggestion?

The Half-Life version only checks for allies in the way afair, probably a more ideal behavior would be to check if any object is in the way whatsoever; ally, enemy, or otherwise; possibly even letting the player control this behavior, whether it'll allow the creature to shoot at any enemy or only its target.
Blue Shadow
Global Moderator
Global Moderator
Posts: 308
Joined: Sun Aug 29, 2010 6:09

Re: Stop Shooting Each Other Dammit!

Post by Blue Shadow »

Eruanna wrote:I think he means a property like Half-Life monsters where the AI scans their hitscan lines before firing;...
Something that could possibly achieve that has already been suggested, here.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Stop Shooting Each Other Dammit!

Post by Gez »

Boingo the Clown wrote:That is to say if there is another monster between itself and the player the monster will either:
  1. not fire
  2. or its shot will have no effect on the other monsters
  3. or perhaps that it will even shoot through the other monster (without affecting it) and hit the player.
(list formatting mine)
  1. This needs a new feature.
  2. Possible with custom damage types and custom damage factors.
  3. Possible with A_WolfAttack for hitscans, and MTHRUSPECIES for projectiles.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Stop Shooting Each Other Dammit!

Post by Enjay »

Unfortunately 1 is the only one that could truly give the impression of an intelligent enemy who decided not to fire because his buddy was in the way and would work for projectile attacks as well as hitscan (because the check and the attack would be separate).

I haven't really had the opportunity to check out FDARI's code submission. How does it look?
User avatar
NeuralStunner
Posts: 253
Joined: Tue Dec 29, 2009 3:46
Location: IN SPACE
Contact:

Re: Stop Shooting Each Other Dammit!

Post by NeuralStunner »

It's worked well so far, though I haven't been able to try the latest one since my usual test engine (yan Cordell's Tower of Babel) is currently broken in other ways.

Although if you'd like to make a GZDoom experimental build of it and upload it to the DRD page, that'd be great too. ;)
Dean Koontz wrote:Human beings can always be relied upon to exert, with vigor, their God-given right to be stupid.
Spoiler: System Specs
Locked

Return to “GZDoom”