Multiple Item drops

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Lazarus
Posts: 20
Joined: Mon Oct 04, 2004 11:24 am
Location: England

Multiple Item drops

Post by Lazarus »

In the Wiki it says that you can have an unlimited amount of dropitem entries for an actor.

I've tried this in DECORATE for my own monster but i can't seem to get it to drop more than one item. Instead, when i have more than one, I keep getting error messages when I start zdoom.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

Make sure you make it like this:

Code: Select all

Dropitem Megasphere
Dropitem DoomImp
Dropitem Blood
etc
Lazarus
Posts: 20
Joined: Mon Oct 04, 2004 11:24 am
Location: England

Post by Lazarus »

Oh I didn't realise that you had to put Dropitem in front of each one.
Thanks.
Lazarus
Posts: 20
Joined: Mon Oct 04, 2004 11:24 am
Location: England

Post by Lazarus »

I noticed that when I use dropitem to create two more monsters after one has died they get stuck. Is there a way to correct this?
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

Post by Macil »

The reason is because both monsters are spawned at the same spot.
Lazarus
Posts: 20
Joined: Mon Oct 04, 2004 11:24 am
Location: England

Post by Lazarus »

Is there any way to stop them being spawned in the same spot.

Or maybe you could put a delay on it so that the first monster has time to move out of the way before the second one spawns.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Post by wildweasel »

In your DECORATE lump, in the monster's death state, after you've placed the A_NoBlocking codepointer, add the appropriate delays for the first dropped monster to get out of the way, then add an A_CustomMissile. Example, if you're wanting to make an explosive barrel drop a Doom Imp:

Code: Select all

Death:
NULL Z 1 A_NoBlocking
NULL Z 35
NULL Z 1 A_CustomMissile("DoomImp", 0, 0, 0)
Stop
This makes the actor wait a whole second before spawning the Doom Imp.
Lazarus
Posts: 20
Joined: Mon Oct 04, 2004 11:24 am
Location: England

Post by Lazarus »

Basically I'm trying to make a baron of hell that spawns two more of itself when it dies.
This is what I have so far;

Code: Select all

ACTOR SpawnerBaron : BaronOfHell 20607
{

	Obituary "%o was outnumbered by the spawner baron."
	DropItem SpawnerBaron
	DropItem SpawnerBaron
	States
	{
	Death:
	    BOSS I 8
	    BOSS J 8 A_Scream
	    BOSS K 8
	    BOSS L 8 A_NoBlocking
	    BOSS MN 8
	    BOSS O -1 A_BossDeath
	    Stop
	}
}
Which areas of the death state do I change.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

You can't do it that easily. Spawning one new monster is no problem but for the second one to spawn the first one has to move out of the way first. Movement is somewhat random and depends on many factors so it is impossible to tell how long it will take. In your case a script is the only option. The script is executed upon the monster's death and can try to spawn the new monsters in place until both are there.

Anyway, what's a monster worth that replicates endlessly?
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

Maybe some kind of boss, which after splitting them for a while you can kill it another way by crushing ceiling or something
Lazarus
Posts: 20
Joined: Mon Oct 04, 2004 11:24 am
Location: England

Post by Lazarus »

What I'm trying to end up with is a monster that keeps spawning more of itself unless you kill it with the correct weapon. If killed with the correct weapon, then the monster won't spawn any more of itself when it dies.

I just haven't got to this part yet.
In your case a script is the only option.
If your talking about ACS then I don't know how I'm going to do that seeing as the ACS program is in DOS and I can't get it to run on my machine.
User avatar
Chris
Posts: 2979
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Chris »

There's a Windows-based ACS compiler. Check the Downloads page.
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

IT's easy with no scripts involved. Use DeHackEd to give the projectile of the weapon you need to use to kill the barons the FIREDAMAGE flag. Then you change your DECORATE to this:

Code: Select all

ACTOR SpawnerBaron : BaronOfHell 20607
{
   Obituary "%o was outnumbered by the spawner baron."
   States
   {
   Death:
       BOSS I 8
       BOSS J 8 A_Scream
       BOSS K 8
       BOSS L 0 A_CustomMissile ("SpawnerBaron", 32, 0, 24)
       BOSS L 0 A_CustomMissile ("SpawnerBaron", 32, 0, -24)
       BOSS L 8 A_NoBlocking
       BOSS MN 8
       BOSS O -1 A_BossDeath
       Stop
   Burn:
       BOSS I 8
       BOSS J 8 A_Scream
       BOSS K 8
       BOSS L 8 A_NoBlocking
       BOSS MN 8
       BOSS O -1 A_BossDeath
       Stop
   } 
Easy.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

A_CustomMissile is not the best way to spawn monsters. Depending on the scenario they can get easily stuck or not be spawned at all. To do this reliably the only real way to achieve it is to execute a script that can perfectly control that exactly 2 copies are spawned from it. Why use dirty hacks if it can be done cleanly?
User avatar
ellmo
Posts: 429
Joined: Thu Mar 04, 2004 9:21 am
Location: Poland - Poznan
Contact:

Post by ellmo »

Man... I treid to make a Zombie that keeps geeting up after death until you splatter him with rockets or such, It was back in .63a, but I couldn't get it to work properly. Because you really didn't need rockets to kiil it. You just shot it, and stood on it for some time. After a 7 second delay (or so), when the moster is about to get up, it was just killed by the player standing above him, and didn't come back.
Locked

Return to “Editing (Archive)”