Different Death States on a Monster ?

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
Mayhem666
Posts: 501
Joined: Sun Feb 26, 2012 6:17 pm
Location: Canada,Qc

Different Death States on a Monster ?

Post by Mayhem666 »

Yes, I would like to know if it's possible to make multiple death state on a Monster. Like if he get killed by shotgun he will die this way or by the chaingun this other way.

Thanks
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: Different Death States on a Monster ?

Post by Blue Shadow »

[wiki=Custom_damage_types]It can be done through the magic of damage types[/wiki].
User avatar
Ravick
Posts: 2049
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

Re: Different Death States on a Monster ?

Post by Ravick »

You can also use some "A_Jump" function in the start of the monster's death and check if it's target has somekind of weapon, "dummy item" and stuff at the moment the monster dies .
User avatar
Mayhem666
Posts: 501
Joined: Sun Feb 26, 2012 6:17 pm
Location: Canada,Qc

Re: Different Death States on a Monster ?

Post by Mayhem666 »

I want to set some different death state based on the weapon used to kill the monster in question.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Different Death States on a Monster ?

Post by Graf Zahl »

Ravick wrote:You can also use some "A_Jump" function in the start of the monster's death and check if it's target has somekind of weapon, "dummy item" and stuff at the moment the monster dies .
... and then wonder a year later why your mod doesn't work anymore. Talk about undefined behavior and hacks...


For the intended effect the best option is to redefine the weapons that they have each a specific damage type and then give the monsters specific death states for those damage types.
With the stock weapons it is not possible because they do not have specific damage types.
User avatar
Mayhem666
Posts: 501
Joined: Sun Feb 26, 2012 6:17 pm
Location: Canada,Qc

Re: Different Death States on a Monster ?

Post by Mayhem666 »

Graf Zahl wrote:
Ravick wrote:You can also use some "A_Jump" function in the start of the monster's death and check if it's target has somekind of weapon, "dummy item" and stuff at the moment the monster dies .
... and then wonder a year later why your mod doesn't work anymore. Talk about undefined behavior and hacks...


For the intended effect the best option is to redefine the weapons that they have each a specific damage type and then give the monsters specific death states for those damage types.
With the stock weapons it is not possible because they do not have specific damage types.

Okay so i need to set different damage type for each weapon that i want a different death state. right?
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: Different Death States on a Monster ?

Post by amv2k9 »

Mayhem666 wrote:Okay so i need to set different damage type for each weapon that i want a different death state. right?
If the weapon fires projectiles, set the damagetype on the projectile. If it fires hitscans, set the damagetype on the puff actor used. For rail attacks, I think the procedure is the same as hitscans.
User avatar
Mayhem666
Posts: 501
Joined: Sun Feb 26, 2012 6:17 pm
Location: Canada,Qc

Re: Different Death States on a Monster ?

Post by Mayhem666 »

When i did that, how is the process of putting them on the Death state of the monster?

I think it was Death. ????

Or something like that.
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: Different Death States on a Monster ?

Post by ChronoSeth »

Use Death.DamageTypeName as the state label, where DamageTypeName is whichever damagetype you want to trigger that death sequence.
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

Re: Different Death States on a Monster ?

Post by Blue Shadow »

Mayhem666 wrote:When i did that, how is the process of putting them on the Death state of the monster?

I think it was Death. ????

Or something like that.
Did you check the link that I put above?
User avatar
Mayhem666
Posts: 501
Joined: Sun Feb 26, 2012 6:17 pm
Location: Canada,Qc

Re: Different Death States on a Monster ?

Post by Mayhem666 »

Yeah, i just needed some Exemple about how it works.
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: Different Death States on a Monster ?

Post by amv2k9 »

I suppose its also worth saying if you want to do multiple death types that aren't dependent on damagetypes, for example if you're using those alternate death animations some peeps have made, you can just

Code: Select all

ACTOR NewPinky : Demon
{
 States
 {
 Death:
  TNT1 A 0 A_Jump(160,"Death_ArmTornOff")
  SARG I 8
  ...
  Stop
 Death_ArmTornOff:
  SAR2 I 8
  SAR2 J 7
  ...
  Stop
  }
}
User avatar
Mayhem666
Posts: 501
Joined: Sun Feb 26, 2012 6:17 pm
Location: Canada,Qc

Re: Different Death States on a Monster ?

Post by Mayhem666 »

amv2k9 wrote:I suppose its also worth saying if you want to do multiple death types that aren't dependent on damagetypes, for example if you're using those alternate death animations some peeps have made, you can just

Code: Select all

ACTOR NewPinky : Demon
{
 States
 {
 Death:
  TNT1 A 0 A_Jump(160,"Death_ArmTornOff")
  SARG I 8
  ...
  Stop
 Death_ArmTornOff:
  SAR2 I 8
  SAR2 J 7
  ...
  Stop
  }
}
I want them to be dependent on the weapon used to kill the monster actually.
Locked

Return to “Editing (Archive)”