A Flag that fixes a 'bug' with +AMBUSH (or deaf) monsters
Moderator: GZDoom Developers
-
- 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
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?
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?
- 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
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.)
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.)
-
- 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
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".
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".
Re: A Flag that fixes a 'bug' with +AMBUSH (or deaf) monster
"Deaf" is somewhat of a misnomer. Ambush fits better, because the actor hears you, but chooses not to activate.ant1991331 wrote:So, there's a difference between "Deaf" in Doom Builder and +AMBUSH?
That's pretty much intended behavior. I think you can get around this with A_LookEx already, also.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?
- 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
It shouldn't be "fixed". A new flag that adds true deafness would work.
- 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
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 wrote:So, there's a difference between "Deaf" in Doom Builder and +AMBUSH?
-
- 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
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.
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.
- 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
What exactly are you trying to do? Everything you've described sounds a lot simpler to me than you're making it. 

-
- 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
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