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

Infinite enemy spawning

Recommended Posts

hi i wanted to make a map where 1 zombieman is spawned then when he is killed a few seconds later another one spawns and ect.

i would like to use ASC scripting if possible. (this function will be used in multiple different areas)

Share this post


Link to post

I know how to do this with DECORATE. Make a custom version of the zombieman, and in its Death state, wait a while and then spawn another custom zombieman of the same type (or another, if you want) before ceasing to exist (or remaining as a normal dead body, if you prefer). Here is a quick, untested example:

Actor InfiniteZombieman : Zombieman replaces Zombieman

{
  States
  {
  Death:
    POSS H 5
    POSS I 5 A_Scream
    POSS J 5 A_NoBlocking
    POSS K 5
    POSS L 3*35 //wait 3 seconds
    POSS L 0 A_SpawnItemEX ("InfiniteZombieman")
    POSS L -1
    Stop
  XDeath:
    POSS M 5
    POSS N 5 A_XScream
    POSS O 5 A_NoBlocking
    POSS PQRST 5
    POSS U -1
    Stop
  }
}

This version can only be permanently stopped by gibbing it because it doesn't spawn another one in its XDeath state, which I included even though it is not needed here because it is unchanged, in case you wanted to change it.

 

EDIT: I just thought of perhaps a better way. This version will enter its Raise state, getting back up like it was revived by an archvile:

Actor UndyingZombieman : Zombieman replaces Zombieman

{
  States
  {
  Death:
    POSS H 5
    POSS I 5 A_Scream
    POSS J 5 A_NoBlocking
    POSS K 5
    POSS L 3*35 //wait 3 seconds
    goto Raise
    Stop
  XDeath:
    POSS M 5
    POSS N 5 A_XScream
    POSS O 5 A_NoBlocking
    POSS PQRST 5
    POSS U -1
    Stop
  }
}

 

Edited by Empyre

Share this post


Link to post

i don't know if this would be a big hassle but could you make the Decorate for me? i really don't know crap about decorate's (except putting them into custom wads)

Share this post


Link to post
3 hours ago, Thedoctor989 said:

i don't know if this would be a big hassle but could you make the Decorate for me? i really don't know crap about decorate's (except putting them into custom wads)

Here it is, and this time it is tested:

Actor UndyingZombieman : Zombieman replaces Zombieman

{
  States
  {
  Death:
    POSS H 5
    POSS I 5 A_Scream
    POSS J 5 A_NoBlocking
    POSS K 5
    POSS L 103 //wait 3 seconds (3*35)
    POSS K 5
    POSS JIH 5
    POSS A 0 A_SpawnItemEX("UndyingZombieman")
    Stop
  XDeath:
    POSS M 5
    POSS N 5 A_XScream
    POSS O 5 A_NoBlocking
    POSS PQRST 5
    POSS U -1
    Stop
  }
}

In Slade, make a new entry named DECORATE, and make sure that it is in front of your map, not in the middle of the map lumps. Select the new DECORATE lump, click on View as Text and in the drop-down menu, select ZDoom Decorate. Paste this code in there. Save the DECORATE lump and then save the file. Now, all your zombiemen will rise back up again 3 seconds after dying until they are gibbed.

 

If you want changes made and you can't figure out how, ask away.

Share this post


Link to post

thank you! im suprised at how generous people are on Doomworld, i tried a while on Zdoom forum but everyone was a bunch of jerks!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×