Jump to content
  • 0

Dormant monsters not becoming active?


Cacodoomonic

Question

I have a room full of demons that are completely dormant (the dormant checkbox is ticked). They are supposed to spring to life when a certain event is triggered but they are not happening. It is as if they are not even there as they never wake up. 

 

Script 22 (void)
{
	ThrustThing (224, 8, 1, 40);
	delay (30);
	Thing_Remove (40);
	delay (30);
	SpawnSpotFacingForced ("Zombieman", 46, 46);
	SpawnSpotFacingForced ("Zombieman", 47, 47);
	SpawnSpotFacingForced ("Zombieman", 48, 48);
	delay (30);
	Thing_Activate (49); <<<<<<<< This is the part not working.
}

My demons are all tagged 49 and are set to be dormant. Shouldn't this script wake them up? Why is this not working?

Share this post


Link to post

9 answers to this question

Recommended Posts

  • 0

The script itself works as intended. Maybe they just haven't been alerted? For monsters, ThingActivate will only remove the DORMANT flag, but it will not alert the monsters to the player's presence. You can make sure they either see or hear the player before activating, or use NoiseAlert if they're in a separate space and cannot interact with the player prior to being activated.

Share this post


Link to post
  • 0

Ok I've just tried the NoiseAlert option also. For some reason, still nothing. The Cacodemons are set behind a wall that the player cannot access and they have no line of sight. They are set to dormant because I wanted them to only come to life after a certain even (script) and then begin to lift up and float over the wall into the playing area. The script they are a part of works fine otherwise... it's just this part that does not work. 

Share this post


Link to post
  • 0
Posted (edited)
24 minutes ago, Cacodoomonic said:

Ok I've just tried the NoiseAlert option also. For some reason, still nothing. The Cacodemons are set behind a wall that the player cannot access and they have no line of sight. They are set to dormant because I wanted them to only come to life after a certain even (script) and then begin to lift up and float over the wall into the playing area. The script they are a part of works fine otherwise... it's just this part that does not work. 

 

I could do that by having them in a monster closet far away, and when the trigger happens, a wall lowers and they can cross a silent teleport to behind the wall. Since the player can't see that place or reach it, they wouldn't notice the difference.

 

Or by having them still behind the wall, but surrounded by sound-blocking lines, so they're in a sector which is sound-isolated but joined to another sector which is sealed by a control sector to a third sector joined to an area where the player is making noise. The control sector gets lowered once the event occurs and the enemies will wake up once they hear the noise. That method does require the player to shoot, though.

 

There's a lot which can be done with practical effects like that without needing scripts.

 

25 minutes ago, Cacodoomonic said:

Ok I've just tried the NoiseAlert option also. For some reason, still nothing. The Cacodemons are set behind a wall that the player cannot access and they have no line of sight. They are set to dormant because I wanted them to only come to life after a certain even (script) and then begin to lift up and float over the wall into the playing area. The script they are a part of works fine otherwise... it's just this part that does not work. 

 

Try removing the "Dormant" part, then combine NoiseAlert with the sound-blocking lines method I mentioned and see if that helps.

 

Edited by Stabbey
added idea

Share this post


Link to post
  • 0
5 hours ago, Cacodoomonic said:

Ok I've just tried the NoiseAlert option also. For some reason, still nothing.

I tested it, and it works fine. I added

NoiseAlert(0, 49);

to the end of your script. This alerts all monsters near a thing with tag 49 to the player's (first arg 0) presence. Since your Cacodemons all have tag 49, they become emitters and alert each other (and themselves). Make sure they don't have the Ambush players flag set, because if they do, they won't move until they have a sightline of the player.

 

Also, you mentioned they are behind a wall and float to the playable area? This could mean that they are already alerted to the players presence unless you're using sound blocking lines as Stabbey mentioned. The Ambush players flag would explain why they're still not moving even if they can hear the player. If this is the case, you don't need to use NoiseAlert, and just removing the flag should work (if they're dormant, they'll only attack when they're activated as long as they're alerted).

Share this post


Link to post
  • 0
Posted (edited)

Ok this is possibly the strangest issue I've faced yet. I have checked the Cacos and they are not set to "Ambush Player/Deaf", and they still refuse to activate. Because of this, I completely altered the script. I replaced all the Caco's tagged 49 with MAP SPOTS tagged 49. I thought maybe if they just spawn in via a script at this point, they will no longer need the dormant flag and can begin their attack as soon as the gun fires (since zombie men also attack here that would be a good incentive to fire your weapon and alert them). The strange thing however, still, even with this new method, they do not appear. They do not wake up, possibly not even spawn in. I'm not even sure if they are appearing behind the wall at this point. But regardless, they definitelly do not attack nor do they wake up, since they are not making any sound, either.

 

This is a long shot, but could the issue be that my Cacodemons are custom? They are written up using ZSCRIPT and these ones have the power to resurrect dead zombies.

Edited by Cacodoomonic

Share this post


Link to post
  • 0

Are you using spawnspot or thing_spawn?

I think for custom actors you need spawnspot 

Share this post


Link to post
  • 0
Posted (edited)

The dormant flag is just a way of making a monster not react to anything.  It can't hear, can't see and can't be shot (this is different from the ambush flag where monsters can hear but will not move until the player enters its vision).

 

Activating a monster just makes them react normally, but they will just stand there idle.  What you probably want is Thing_Hate: https://zdoom.org/wiki/Thing_Hate

This will make the monster chase after the player.

Edited by necros

Share this post


Link to post
  • 0

At this point it could be any number of things. I've taken your script as it was originally, added the NoiseAlert call and placed the appropriate actors in a map. It all worked as it should. No drastic redesigns should be necessary, these mechanisms aren't that complex. Most likely some other part of your setup is either incorrect or interfering in a way that you might not even realize.

 

At this point it'd be easier if you just posted the relevant files. If you don't want to share your project publicly, you can DM it to me directly and I'll take a look. That should save plenty of troubleshooting time for all participants.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...