Jump to content

How do i make enemies end level when they all die?


MowEmDown

Recommended Posts

I'll make it more clear, how do i make it so when you kill all enemies it ends the level? Like a cod zombies wave type thing, I use gzdoombuilder.

Share this post


Link to post

Wrong section.

 

Anyhow, you need a script that will constantly check for the monsters to be alive.

So, you could use a while loop: give to all of the monsters a tag and check, with ThingCount, if these are > 0 and when they are no more end the level

Share this post


Link to post

There's a way to specify any action special in ZDoom without any scripts, by adding a line like this in a map definition in MAPINFO:

    SpecialAction = "Arachnotron", "Exit_Normal", 0

This will end the level if all of the Arachnotron in the level are killed (you can replace this with any other type of monster), but I'm not sure if there's a way to replace the monstertype with a more general "all monsters". If there is that'd be a much easier way to do it.

 

EDIT: nope I was wrong, this only works for monsters that already have A_BossDeath, which excludes the majority of the enemy actors (and is why it worked for me for the Arachnotron without having to change anything else).

Edited by brick

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
Reply to this topic...

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