Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Ribbiks

[solved] teleporting dormant enemies (boom)

Recommended Posts

Hihi, I'm wondering if someone could explain this to me:



So I want a setup where if the player does something, hits a switch, whatever, dormant enemies will teleport around them, facing away, asleep. Seems simple enough, just throw some mobs into scrolling closets and there ya go. Unfortunately, if the player has fired a shot before hitting the switch the monsters will wake up instantly after teleporting, even though they didn't hear the bullet from their closets, and even though they're teleporting in facing away from the player.

This sort of reminds me of how deaf enemies go into an ambush state and wake up whenever they get LoS, but what's confusing me here is that the mobs that tele in never hear the player fire, and it doesn't matter whether they're flagged deaf or not.


here's an example wad: https://www.mediafire.com/?9yffcd3ng7yip67 (complevel 9)

- hit switch without firing: desired behavior
- hit switch after shooting: :(((


So I guess my question is: is it possible to have dormant enemies teleport into the same room with a player, and have them remain asleep, even if the player has fired a shot before unleashing them?

Share this post


Link to post

Use 'iddt' x2 an observe if the monsters actually wake from the gun shots. Probably not. I suspect what is actually happening is the mere act of having a monster teleport wakes them up, but I'm not actually sure about this.

Share this post


Link to post

The teleporter destination heard you fire and told the baron. You can draw another sector around the teleporter destination sector and make all lines from both sectors block sound (and you can make the two sectors as small as possible so that the player has a smaller chance of firing from within those sectors and waking up the teleporter destination).

Share this post


Link to post

ToD I love you.


since the teleporting monsters are completely enclosed by 2 block sound lines they'll stay asleep even after they tele in and the player fires, but this is easily solved by having some dummy sectors connect the inner sector to the outer sector after they teleport in, yielding exactly the behavior I was after!

thanks!





on a side note, I never knew tele destination things could be "wake up" :D

Share this post


Link to post
Ribbiks said:

on a side note, I never knew tele destination things could be "wake up" :D

They can't. What actually happens is, each sector has a flag that is set when a sound travels through it, and this flag is never cleared. Any monsters that enter these sectors will immediately wake up and target the player.

This behaviour cannot be trivially fixed, since doing so has some strange side effects: monsters that are infighting will fall asleep when they're done, even if they previously detected the player, and lost souls will fall asleep after every attack they make. This is because monsters forget their previous target in these situations, and only retarget the player due to the sound flag still being set in the sector.

Share this post


Link to post

That's what I meant to say... just kidding :)

But Ribbiks' idea with the dummy sectors makes it work fine. Letting sound go through the dummy sectors lets the previously deaf sector become flagged when the player shoots after pressing the switch.

Share this post


Link to post
Foxpup said:

...
This behaviour cannot be trivially fixed, since doing so has some strange side effects: monsters that are infighting will fall asleep when they're done, even if they previously detected the player, and lost souls will fall asleep after every attack they make. This is because monsters forget their previous target in these situations, and only retarget the player due to the sound flag still being set in the sector.

Hmmm. An interesting experiment: Make a modification to the source to apply a timeout to that sector flag. As long as fighting was still happening, the timer would get reset, but, when the action died down, the monsters could go dormant again.

Might cause some interesting surprises when the player backtracks for ammo :) Could also add a "spy/sniper" dynamic: sneak in, pick off a guy, leave, come back later, rinse+repeat.

On the other hand, not real Doomy. Might be useful in ZDoom as a mapper option (ZDoom is most-equipped for new, inventive game modes).

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×