Jump to content
  • 0

lowering a wall after killing all the enemies in the sector


TheDanMarine

Question

I'm back with a much more complicated question than last time. 

I have a sector filled with enemies, and a wall that raises after you walk into it. I want that wall to lower after you kill all of the enemies. 

it's a bit complicated though, because 

Spoiler

the enemies start off dead then resurrect after you hit a switch as a kind of "jump scare". so I'm not sure how to make sure I'm only checking and running the script after they've resurrected. 

 

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 2

This should get you going in the right direction. Keeping in mind you will need to have a more creative way of hiding the monsters dying :), I just threw a pit with a raising floor because it's quick. Open the level to see what is going on, all the monsters health is set to 0 on spawn, there is a line in front of the door that activates when the player crosses it. Then there is a "Player Enters Sector" thing that controls the Zombie Men raising, you could probably come up with a more creative solution but I leave that to you to experiment with.

 

MonsterDoor.pk3

Share this post


Link to post
  • 1

Heres an excerpt of mine, what you want is to give all the monsters a tag, and then have a variant of this ACS run

 

 

Script 4 (Void)//Testspawn commands
{
    QuakeEx(0,3,3,3,30,0,300,3);//distracts the player while zombies stumble forth
    SpawnSpotFacing("Returned", 167, 267);//zoombies with tag 267 spawn at map points 167
    Delay(16);
    Thing_SetGoal(267, 250, 0, 0);//should set the zombies to march to the middle area
        While(Thingcount(t_none,267))// so while any 267 exist, this code cannot progress
    {
        Delay(1);
    }
    SpawnSpotFacing("Returned", 167, 267);// this is a second wave
    Delay(16);
    Thing_SetGoal(267, 250, 0, 0);//should set the zombies to march to the middle area
    While(Thingcount(t_none,267))
    {
        Delay(1);
    }
    Floor_RaiseByValueTimes8(301,8,8);//after all things with this code die, the wall goes up

Edited by Desfar

Share this post


Link to post
  • 0

assuming I'm reading that right it doesn't really solve the problem. the thing is, since they're dead corpses just hanging out in the level (which is intentionally how I want it), there are no "tagged monsters" as corpses don't count towards things. so, I need to make sure the script for checking only runs after the button is pressed and everything is resurrected otherwise the wall will just raise, then lower again immediately. unless I've misunderstood something.

 

in pseudo-code what I want is something like: 

 

after all monsters resurrect:

   if monsters all dead:

     lower floor

Edited by TheDanMarine

Share this post


Link to post
  • 0
18 minutes ago, HorseJockey said:
Spoiler

 

This should get you going in the right direction. Keeping in mind you will need to have a more creative way of hiding the monsters dying :), I just threw a pit with a raising floor because it's quick. Open the level to see what is going on, all the monsters health is set to 0 on spawn, there is a line in front of the door that activates when the player crosses it. Then there is a "Player Enters Sector" thing that controls the Zombie Men raising, you could probably come up with a more creative solution but I leave that to you to experiment with.

 

MonsterDoor.pk3

 

 

the thing I was missing was using a while loop with a delay to check if there were things in there. everything else I already had, but that was exactly what I needed!

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