A pile of dead demons

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.
Locked
User avatar
MartinHowe
Posts: 2088
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

A pile of dead demons

Post by MartinHowe »

Why doesn't this work?

Code: Select all

ACTOR DemonSolid : Demon 15959
{
//
// This is a demon that is solid when dead
//
// This is needed to create a pile of dead demons of
// which some can be resurrected for a special effect.
//
//$Category butchery
//
	DeathHeight 10
	States
	{
	Death:
		SARG I 8
		SARG J 8 A_Scream
		SARG K 4
		SARG L 4 //  A_NoBlocking
		SARG M 4
		SARG N -1
		Stop
	}
}
A load of these things are placed on the map one above the other at different heights and killed by a script when the level starts. They should fall on top of each other creating a pile of dead demons. Instead, they don't block each other as they ought to and all fall in the same place with no height variation. Even placing an explicit call to A_SetSolid() in the second death state has no effect!

Any ideas?
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 »

Create a decoration that looks like a dead demon and have your "real" demons spawn them when they hit the ground? I'm not sure if that's feasible...I'm pretty much grasping here.
User avatar
MartinHowe
Posts: 2088
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Post by MartinHowe »

wildweasel wrote:Create a decoration that looks like a dead demon and have your "real" demons spawn them when they hit the ground? I'm not sure if that's feasible...I'm pretty much grasping here.
What I need to hit the ground is a true subclass of Demon but dead; in other words Thing_Raise() must work; not sure if that works for a "dead something" decoration.

What I'd really like is for somebody to tell me if the approach is fundamentally broken or not. AFAIK this should work, but I don't like to bug-report it right away because much functionality in the engine does not work under extreme cases for various reasons; this may well be a case of "don't do that", for all I know.
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

Doing anything that requires presice z stuff is really awful in ZDoom. The physics code just can't handle it.

I also don't entirely understand what you want, just making a pile of bodies would look weird in ZDoom (or any other non-ragdoll game).
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

Hehe, I did this by accident once with a dead Spiderdemon body... so it's possible somehow, but ZDoom's z-clipping code isn't too friendly with the player. Perhaps mixing a dead demon's body with the bridge thing's flags might somehow help something?
User avatar
MartinHowe
Posts: 2088
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Post by MartinHowe »

It is definitely the death code in the engine that is causing the problem; if I add a delay at the beginning of the (open) script that kills them, they do indeed "sit" on top of each other in the intended way until they are killed. Even explicitly giving them the same DeathHeight as their "normal" height makes no difference.

This is GZDoom, by the way, not "pure" ZDoom; don't know if that makes any difference.
User avatar
MartinHowe
Posts: 2088
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Post by MartinHowe »

I have at least solved the "dead until activated" problem:

Code: Select all

ACTOR PossumActivate : Inventory
{
// State flag for switched-on
	Inventory.Amount 1
	Inventory.MaxAmount 2
}

ACTOR DemonPossum: Demon 15959
{
//
// This is a demon that is supposed to be dead
// and later resurrected for a special effect.
//
// The idea is to have a pile of dead demons of which
// some come to life. Since a corpse cannot be solid,
// this is faked using advanced DECORATE logic.
//
//$Category butchery
//
	-SHOOTABLE
	States
	{
	Spawn:
		SARG A  0
		SARG A  0 A_JumpIfInventory("PossumActivate",2,5)
		SARG A  0 A_JumpIfInventory("PossumActivate",1,2)
// NotActivated
		SARG N 10
		Loop
// JustActivated
		SARG A  0 A_GiveInventory("PossumActivate",1)
		SARG A  0 A_ChangeFlag("SHOOTABLE",1)
// FullyActivated
		SARG A 10 A_Look
		SARG B 10 A_Look
		Loop
	}
}

Code: Select all

script 238 (void)
{
	GiveActorInventory(183,"PossumActivate",1);
}
This code needs polishing but it does work - I just tried it.

Hmm... "Play possum" is slang in English to play dead... wonder what a Possum is... /me looks it up on Google
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Post by Zippy »

An opossum, like me!
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Post by Phobus »

A possum... if you've ever seen over the hedge you'll know what a possum is (it's avril lavigne and some other actor playing a pair of really furry rats...)
User avatar
solarsnowfall
Posts: 1581
Joined: Thu Jun 30, 2005 1:44 am

Post by solarsnowfall »

They're all over the midwestern and southern United States. One need only travel down an interstate highway long enough to see an opossum, but usually they're not playing dead in this scenario...
Xianir
Posts: 13
Joined: Sun Oct 01, 2006 11:31 am

Post by Xianir »

Lol least uncommon here, maybye for the "pile" why not make a sprite of it?
User avatar
Kirby
Posts: 2697
Joined: Thu Aug 26, 2004 1:23 pm

Post by Kirby »

Heh, we used to have a few come our way back in DC. We once had one in our garage that my dad trapped in a box
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

Kirby wrote:We once had one in our garage that my dad trapped in a box.
Wow, I read that as "We once had one [an opossum] in our garage that trapped my dad in a box." :?
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

Wasn't there something like the Active and Inactive states for things like torches and other light sources? Couldn't that be used here?
Locked

Return to “Editing (Archive)”