Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
c1rcu1tn3rd

Monsters death ends level

Recommended Posts

Hey all I just started creating levels with Doom Builder 2 for Doom 2 and was wondering if there was a way so that when a monster dies it will end the level. For instance in the test level I'm making when I kill the cyberdemon I want the level to end. Is this possible? Any help is greatly appreciated!

-Matt

Share this post


Link to post

It is possible, but there are different ways to achieve that.

The simplest and most compatible is to make your level for Doom instead of Doom 2, and place it in the E2M8 slot.

An alternative is to use a MAPINFO lump, but then there are no universal format so it depends on what port(s) you target. For example, in a ZDoom ZMAPINFO, you'd give your level definition the cyberdemonspecial and specialaction_exitlevel properties. In an Eternity EMAPINFO, you'd put boss-specials = E2M8.

The last possibility would be to use a DeHackEd patch to make the cyberdemon call A_BrainDie instead of A_BossDeath. But that'll affect all cyberdemons in all levels in your mod.

Share this post


Link to post
Gez said:

The last possibility would be to use a DeHackEd patch to make the cyberdemon call A_BrainDie instead of A_BossDeath. But that'll affect all cyberdemons in all levels in your mod.

Not only that, but:
a) It will happen when just one cyberdemon is killed.
b) It may happen even if you're dead. That's unrealistic, unless the mission was meant as a sacrifice or final mission.

None of the five Heretic boss levels end the level when they get killed, by the way. Besides A_BrainDie, there's A_KeenDie. That causes all 666-tagged doors to open at turbo speed when all monsters of that species are dead. Unlike A_BossDeath, it can be given to any monster species, and it should work on any level that has them. Place a teleport portal that leads you out of the world (exit) behind that door, if you wish.

Note: vanilla Dehacked doesn't use those fancy A_* names. Instead, look for the frame in "Big Brain" or "Commander Keen" death sequence that has a non-zero codepointer by the time you expect the level to end or blazing doors to open, respectively. Remember that frame number, and apply its same codepointer to the Cyberdemon death frame that has A_BossDeath (another nonzero codepointer).

Share this post


Link to post
Manhunt21 said:

Can't you map in Zdoom (Doom in Hexen format) and set the 'Boss''s value Endgame?

That's what I do.

He could, but the million dollar question is. Does he want to?

Share this post


Link to post
c1rcu1tn3rd said:

... For instance in the test level I'm making when I kill the cyberdemon I want the level to end. Is this possible? ...

Yes, it is easily possible, if ...

You map for ZDoom or GZDoom.
Using the format ZDoom_DoomHexen.cfg, you could apply a script, such as this:

#include "zcommon.acs"

script 1 OPEN
{
   While
    (ThingCount(T_CYBERDEMON, 1) > 0)
      
        Delay(35);
        PrintBold(s:"WELL DONE");
        Delay(35*5);
        Exit_Normal(0);
}
In DB2
give the CYBERDEMON a tag of 1,

then press F10 to open the script editor,
copy/paste the above script,
press the compile icon,
close the script editor,

and press F9 to test the map.

http://files.drdteam.org/index.php/files/get/WfeW67vNfM/end-game.7z

Share this post


Link to post

I HIGHLY suggest you use Gez's third suggestion. It's really a whole lot easier than it sounds. If you're not familiar with Dehacked, it takes a while to understand what you're doing, but if you are familiar with it and what it is capable of, it's only a few mouseclicks (with WhackEd) to get that desired effect. I could make the dehacked patch for you if you're interested. In turn this will make your wad playable across many different source ports.

Share this post


Link to post

Another possible dehacked method is to give the cyberdemon the Keen death code pointer. This makes it so when all cyberdemons on a map are dead, walls tagged 666 will open like a door. You can arrange it so that opens up the exit.

Advantages:
You can have several cyberdemons in a map, and the action won't be triggered when just one is killed.
You can use it in a multi-level wad without impacting other maps (there's no need to have tag 666 in other maps, or you could use it in another way.
Works on all maps, even in Ultimate Doom.

Disadvantages:
The player doesn't exit the map immediately upon the death of the cybers. *
For Nightmare skill, there would be a need to rekill any cybers that had respawned (so you can't have them at opposite ends of a long map).

* This can be solved if you are mapping for Boom (or Boom-compatible), as you can use a conveyor belt to create an exit system that works when the door is opened. That will work with most ports. But it might be best for maximum compatibility to have this in addition to an exit that opens up.

Share this post


Link to post
Grazza said:

Another possible dehacked method is to give the cyberdemon the Keen death code pointer. This makes it so when all cyberdemons on a map are dead, walls tagged 666 will open like a door. You can arrange it so that opens up the exit.

That's what I said before!

Share this post


Link to post

Or alternatively, you could apply the Cyberdemon's states to another object, such as a pool of blood or a marble pillar, so that you can have two types of cyberdemons, one that ends the level and one that has it's own state that doesn't have the braindie codepointer.

You wouldn't really need to do any of this anyway if your scenario calls for only having one cyberdemon in your map though.

Share this post


Link to post
40oz said:

Or alternatively, you could apply the Cyberdemon's states to another object, such as a pool of blood or a marble pillar, so that you can have two types of cyberdemons, one that ends the level and one that has it's own state that doesn't have the braindie codepointer.

You wouldn't really need to do any of this anyway if your scenario calls for only having one cyberdemon in your map though.

There's a problem with this: Cyberdemons (and Spider Masterminds) have special behavior hardcoded to their thingtype slots, that makes them immune to splash damage. Without this, a cyberdemon can easily end up killing itself with its own rockets.

Share this post


Link to post

Someone gave me a suggestion called tagging monsters which I assume is similar to tagging sectors. The only problem is though I can't find where to set a tag to a monster. When I right click on a monster there is no option to tag it. Only the thing type, size, position, angle, the difficulty settings and an icon. So....where's the tag function?

Share this post


Link to post

Tagging monsters can only be done in the zDoom/Hexen formats, which are basically the only maps that support linedef actions and scripts which use monster tags.

You could just convert the map, though I think there's some risk of your level geometry being garbled - so back up your WAD first. I'm curious, what was the suggestion to tag monsters for?

Share this post


Link to post

Good point, essel. I guess it would be better to replace the spiderdemon with the special cyber, and then replace a decoration or something with the spiderdemon?

Grazza said:

Disadvantages:
The player doesn't exit the map immediately upon the death of the cybers.

Here's an idea that "should" work in vanilla: autoexit.zip

Got the idea from coopbuild. The green pillar with the heart is changed so that it keeps shooting rockets after it sees or hears the player. There's a door around it with tag 666 that blocks the pillar's shots, and there are romero heads behind the door. When all the keens are killed, the door opens and the green pillar shoots the romero heads to death and ends the level.

Share this post


Link to post
c1rcu1tn3rd said:

Hey all I just started creating levels with Doom Builder 2 for Doom 2 and was wondering if there was a way so that when a monster dies it will end the level. For instance in the test level I'm making when I kill the cyberdemon I want the level to end. Is this possible? Any help is greatly appreciated!

-Matt


I went ahead and made this for you with the DeHacked utility.

http://jbserver.com/forums/attachments/8342_cyberdemon.zip

If you run your map with this .deh file, any cyberdemon killed on your map will end the level after it has finished it's death animation. You can use a lump editor such as SLumpEd or XWE (download links to those programs can be found in this section of this site) to import the file into your wad to keep everything all in one piece. This little file will keep you from having to switch mapping formats and is compatible across many different source ports and you won't have to change anything in your map. Just place the cyberdemon as you normally would.

Share this post


Link to post
TimeOfDeath said:

Good point, essel. I guess it would be better to replace the spiderdemon with the special cyber, and then replace a decoration or something with the spiderdemon?

Two things though, again: the cyberdemon replacing the spider will be slightly less aggressive than the authentic one (not by much), and the spiderdemon in turn will become vulnerable to splash damage, dying from mere 15 rockets; therefore you'd better forget about placing spiders (not that they're much of a loss).

Share this post


Link to post

Yeah, I know.... monster bump...

I have a related question. Is it possible to do this with enemies other than a Cyberdemon?

-EDIT-
NM, I sort of figured out a workaround to my issue...

Share this post


Link to post

When I Kill One Enemy, It Opens The Door.
How Do I Make It Where It Needs All Enemies With
A TID Of 2 To Be Killed?

Share this post


Link to post

The Forum FAQ Tells You To Not Randomly Bump Old Threads, Enderkevin13.

And also to write normally.

Share this post


Link to post

Sorry About That, I Was Just Desperate For Help.

And The Caps Thing, It's Hard To Stop Just.
I Accidentally Started Typing Like This One
Day, Never Stopped. Don't Ask How That Happened. XD

Share this post


Link to post
Guest
This topic is now closed to further replies.
×