A Flag that fixes a 'bug' with +AMBUSH (or deaf) monsters

Moderator: GZDoom Developers

Post Reply
ant1991331
Posts: 598
Joined: Fri Jun 24, 2005 3:19 am
Location: Makin tracks with jetboots

A Flag that fixes a 'bug' with +AMBUSH (or deaf) monsters

Post by ant1991331 »

Hey.

I've been working on a mod that kind of relies on stealth tactics, but I've noticed that if a Deaf (through Doom Builder) monster is in the same sector as you but can't see you - he obviously won't wake up, but if you try to sneak up on him he'll automatically know you're there.

It's like he suddenly gets "LOOKALLAROUND" which I think is stupid. Is it possible we could have a new Actor flag or a new A_LookEx flag that fixes this?
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 Flag that fixes a 'bug' with +AMBUSH (or deaf) monster

Post by NeuralStunner »

AMBUSH is not deaf. And nothing you described is a bug.

AMBUSH causes the monster to delay waking on a sound alert until you enter a possible line of sight. (That is, anywhere within 360 degrees.) Also, any monster will wake up, AMBUSH or otherwise, if you bump into them.

Read up a little better on [wiki]A_LookEx[/wiki] and you'll find what you need right there. (I.E. Set their minimum see distance to 1, and they won't react to being bumped from behind.)
ant1991331
Posts: 598
Joined: Fri Jun 24, 2005 3:19 am
Location: Makin tracks with jetboots

Re: A Flag that fixes a 'bug' with +AMBUSH (or deaf) monster

Post by ant1991331 »

So, there's a difference between "Deaf" in Doom Builder and +AMBUSH?

If not, then nothing you told me helps at all.

The monster is placed in a the same sector as non-Deaf monsters, and I don't want him to be able to just suddenly know where I am because he's meant to be "deaf".
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: A Flag that fixes a 'bug' with +AMBUSH (or deaf) monster

Post by Ghastly »

ant1991331 wrote:So, there's a difference between "Deaf" in Doom Builder and +AMBUSH?
"Deaf" is somewhat of a misnomer. Ambush fits better, because the actor hears you, but chooses not to activate.
ant1991331 wrote:I've been working on a mod that kind of relies on stealth tactics, but I've noticed that if a Deaf (through Doom Builder) monster is in the same sector as you but can't see you - he obviously won't wake up, but if you try to sneak up on him he'll automatically know you're there.

It's like he suddenly gets "LOOKALLAROUND" which I think is stupid. Is it possible we could have a new Actor flag or a new A_LookEx flag that fixes this?
That's pretty much intended behavior. I think you can get around this with A_LookEx already, also.
User avatar
InsanityBringer
Posts: 3392
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: A Flag that fixes a 'bug' with +AMBUSH (or deaf) monster

Post by InsanityBringer »

It shouldn't be "fixed". A new flag that adds true deafness would work.
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 Flag that fixes a 'bug' with +AMBUSH (or deaf) monster

Post by NeuralStunner »

ant1991331 wrote:So, there's a difference between "Deaf" in Doom Builder and +AMBUSH?
Nope. In my DB2 config I chaned that string to "Ambush" regardless. I think "Deaf" is a misleading holdover from the old editing days...
ant1991331
Posts: 598
Joined: Fri Jun 24, 2005 3:19 am
Location: Makin tracks with jetboots

Re: A Flag that fixes a 'bug' with +AMBUSH (or deaf) monster

Post by ant1991331 »

I found
LOF_NOSOUNDCHECK for A_LookEx

This makes the actor completely deaf, but not quite what I'm after. Although, I could use A_JumpIf(args[4] == 1, "SpawnDeaf") in the Spawn state, and by settings "arg4" in Doom Builder to 1, it will jump. But then, how would he hear that I fire a weapon near him? Perhaps a low maxhear distance could work, since the maps are quite small and they only have a 300-unit attack range.

Another (but kinda silly) idea was to isolate the actor in it's own sector that uses Block Sound linedefs, but I think the latter is more appropriate.
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 Flag that fixes a 'bug' with +AMBUSH (or deaf) monster

Post by NeuralStunner »

What exactly are you trying to do? Everything you've described sounds a lot simpler to me than you're making it. :?
ant1991331
Posts: 598
Joined: Fri Jun 24, 2005 3:19 am
Location: Makin tracks with jetboots

Re: A Flag that fixes a 'bug' with +AMBUSH (or deaf) monster

Post by ant1991331 »

A monster in the same sector as another with AMBUSH on will not allow me to sneak up on him, because he'll already know I'm there. I've managed to make a code that prevents this from happening though.

Code: Select all

  Spawn:
    NAZ1 A 0 A_GiveInventory("KnifeWeakness",1)
    NAZ1 A 0 A_JumpIf(args[4] == 2, "SpawnDeaf")
    NAZ1 A 10 A_LookEx(0,1,1000,0,100,"See")
    Loop
  SpawnDeaf:
    NAZ1 A 0 A_GiveInventory("KnifeWeakness",1)
    NAZ1 A 10 A_LookEx(0,1,1000,100,100,"See") //Hear distance 100
    loop
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”