A_AlertMonsters: Target Emitter (and Misc.)

Moderator: GZDoom Developers

Post Reply
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

A_AlertMonsters: Target Emitter (and Misc.)

Post by NeuralStunner »

A flag for [wiki]A_AlertMonsters[/wiki], which causes alerted actors to target the calling actor rather than an associated player. Further actions (like deciding whether to actually attack the actor) can be handled by the coder, once the actor has a target.

This is to provide improved noise mechanics, since a monster could react to a sound, but not immediately know where the culprit is.

Additionally, another flag to "center" the noise on the emitter's position. (Thanks to Enjay for the idea.)

While thinking about it: Another useful flag would be to force AMBUSH-flagged monsters to give chase immediately. I can post a separate suggestion for that if need be. Either way, the function gets a flags field where more behaviors can be added later.

Which brings it up to:
  • AMF_CenterCaller: Noise origin and distance check is relative to the emitter.
  • AMF_TargetCaller: The emitter is the target of alerted monsters.
  • AMF_CheckSight: Only alert monsters with a possible line-of-sight to the target (or emitter, if that flag is also given).
  • AMF_AmbushAlerts: Force AMBUSH monsters to respond immediately.
  • AMF_AmbushIgnores: AMBUSH monsters will ignore the alert entirely. Obviously, the above makes this useless.
Last edited by NeuralStunner on Sat Sep 01, 2012 12:54 pm, edited 1 time in total.
ZzZombo
Posts: 317
Joined: Mon Jul 16, 2012 2:02 am

Re: A_AlertMonsters: Target Emitter

Post by ZzZombo »

It already can be implemented with Thing_Hate().
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: A_AlertMonsters: Target Emitter

Post by NeuralStunner »

No. It can't.
User avatar
Trance
Posts: 1089
Joined: Mon Jan 17, 2005 6:28 am
Location: 1, Rotation: 0

Re: A_AlertMonsters: Target Emitter (and Misc.)

Post by Trance »

I'm all for this idea; imagine a stealth mod for ZDoom with aggro mechanics like Thief. With this addition to A_AlertMonsters it would be trivially easy.
User avatar
cypherphage
Posts: 213
Joined: Sun Feb 27, 2011 2:54 am

Re: A_AlertMonsters: Target Emitter (and Misc.)

Post by cypherphage »

Could be neat if there were noise types similar to damage types so that walking a monster screaming could trigger different behavior from a player shooting a gun though I doubt it'd happen.

Mind you, it seems like calling a_radius_give a few times with different radii and "noise item" amounts per distance could fake this to some degree. Hell, a radius give with a custom inventory that calls an ACS distance function should be able to do an even better version...I wish I still had time to make fun things like that.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: A_AlertMonsters: Target Emitter (and Misc.)

Post by NeuralStunner »

You really cant get this effect with any radius-based system. No other method follows the same sector-traversal as noisealerts.
User avatar
cypherphage
Posts: 213
Joined: Sun Feb 27, 2011 2:54 am

Re: A_AlertMonsters: Target Emitter (and Misc.)

Post by cypherphage »

That's why I said sorta. If you wanted a more noise like system, some way to make noise fall off and have enemies have a hearing threshold/factor seems like it'd be dandy. I'd love to see some actual stealth mechanics get implemented into zdoom.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: A_AlertMonsters: Target Emitter (and Misc.)

Post by NeuralStunner »

I've worked out the emitter/target features. I didn't get everything yet (I'll worry about sight checks and AMBUSH behaviors later), and what I included differs a bit from the OP. But I think I got things a bit better than I originally considered.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”