Jump to content

Is there a way I could make the exit level happen when at least 70 enemies are killed?


Recommended Posts

For my mod, I've created a level where you wake up in an abandoned woods full of invisible demons. I want it to be that whenever you kill 70 enemies in this level, it exits, shows the intermission screen, and then goes to the next map.

 

132500798_Screenshot2024-05-30at19_54_36.png.1063ffbfdfdc0514e5539ab9d67edb1a.png

 

If anyone could help me out with this, I would be very happy!

Share this post


Link to post
Posted (edited)

As a thought experiment (I don't actually know the answer; I'm no genius with scripting/programming) I feel like this idea may work:

 

Give every monster the same tag number.

Write a script that runs on a loop where it checks if a tag# monster dies, and if so then increment a counter. Another script continually checking that counter so when it hits 70, it exits level.

 

That would be with GZDoom & ACS scripting, which is all I know.  Hopefully I'm basically right, and someone experienced can lay that out for you.

Edited by DiavoJinx

Share this post


Link to post
Posted (edited)

The map format and target port would help greatly in how you would accomplish this.

In ACS you'd probably want a While loop running that delays a few tics if less than 70 enemies have been killed, or executes the level exit if 70 enemies have been killed. Some of the above examples touch upon this and Chubz has a great tutorial on how these work.

In MBF21 with UMAPINFO you could use a bossaction or combination of boss actions that trigger a door(s) across voodoo closets; this would entail having set numbers of enemies of each type, then when 35 X enemies and 35 Y enemies (the totals of each) are killed, the doors open and the voodoo walks over the level exit. Bossactions will only occur when all the enemies of the specified type are killed so it can get complicated or require several closets (one for each possible combination of the totals across several types to get to 70).
If they're all pinkies it would like this:
bossaction = Demon, (switch/action you want for whatever is blocking your voodoo), (whatever tag is on the wall/door)

-Quoted from the UMAPINFO article linked above:
"bossaction = thingtype, linespecial, tag: Defines a boss death action, overriding any map default actions. Tag 0 is not allowed except for level exits. Shoot triggers, teleporters and locked doors are not supported. A map may define multiple death actions. Thingtype uses ZDoom's class names (see list below.)"

In vanilla, you'd make your map a level where the exe has hard coded bossactions for that level, and use the appropriate enemy type.
 

Edited by DeetOpianSky
additional link/info.

Share this post


Link to post

Theres some really decent Ideas going on here, and it is a cool mechanic that is definitely underutilized in DOOM/ Doom 2 specifically due to the game's base build. In fact, one of the earliest example in FPS history that I can recall that does this would Halo 1 on map 343 Guilty Spark.

 

So the easiest place implement this is in ZDoom/GZDoom. Then next route is to make it as painless as possible when coding the even to happen. THere are a few options available in the form of MAPINFO Flags and MOnster Flags.

 

https://zdoom.org/wiki/MAPINFO/Map_defi

Spoiler

Screenshot_2024-05-31_16-30-15.png.524f90f03219202f1738874c4fc4d05a.png

 

 

NOw this tactic with MAPINFO says it relies on the A_BossDeath function. So on Vanilla Monsters thats : Mancubus, Arachnotron, CyberDemon, Baron of Hell and SpiderMasterMind.

YOu can also use some custom monsters that have the A_BossDeath used in their Death State.

 

So in MAPINFO it would look similar to this, if Im understading this correctly

Spoiler

Map06 "Run Forest Run"
{ 
  Next = Map07
  SpecialAction = "BossIMP" , "SpecialAction_ExitLevel"
}

 

 

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