bytor Posted May 15, 2012 I'm trying to either assign a DamageType to the Chainsaw and/or have the target Actor recognize that the damage is from the Chainsaw. I want damage/death from projectiles and Chainsaw. I've tried various things with A_SAW, A_JUMPIF, etc. but the best I could do was crash ZDoom to a lovely error-reporting window. I'm inhereting from a Hexen Actor that has a "Burn" state and my Decorate is simply:ACTOR TreeCon1 : ZXmasTree 800 { Painchance "Fire", 256 Painchance "Plasma", 256 //etc... States { Spawn: XMAS A -1 STOP Pain.Fire: XMAS BCB 3 GOTO Spawn Pain.Plasma: XMAS BCB 3 GOTO Spawn Death.Plasma: GOTO Burn //Burn already recognizes "Fire" } } ACTOR RocketBurner : Rocket replaces Rocket {DamageType Fire} ACTOR PlasmaBallBurner : PlasmaBall replaces PlasmaBall {DamageType Plasma} So simple if I only want damage/death from just a projectile or two, but "ACTOR EBeaver : Chainsaw replaces Chainsaw {DamageType "Beaver"}" doesn't work. The following also seems to achieve what I'm going for without having to assign a DamageType to all the projectiles(if I want Death from ALL projectiles), and hitscan damage won't kill it. I would still need it to recognize Chainsaw damage seperately.ACTOR TreeCon1 : ZXmasTree 800 { Health 21 Painchance 256 PainThreshold 1 States { Pain: XMAS A 0 XMAS A 1 A_Respawn (false) //no spawn cloud GOTO Spawn Death: XMAS A 0 XMAS A 1 A_JumpIfHealthLower(1, "Burn") STOP } } Seemed rare after minimal testing that a projectile wouldn't kill it in one shot, which is fine. I haven't looked at exact damage range of everything (weapon and monster) but I suppose this could be adjusted with Health, PainThreshhold, and DamageFactor. Also, I didn't consider the radius damage from the "Burn" state with regards to neighboring trees. hmmm Anyways, Chainsaw DamageType...How do I do it? The Eager Beaver, ZDoom-r3601, Doom UDMF 0 Share this post Link to post
Gez Posted May 15, 2012 The problem here is that the chainsaw uses A_Saw with default parameters, which means that the weapon's damage type is ignored. You will have to redefine the attack state. You can keep using A_Saw, but you will have to make it use a custom puff (not BulletPuff), and put the DamageType on that custom puff. 0 Share this post Link to post
bytor Posted May 15, 2012 ACTOR SteelPuff : BulletPuff {Damagetype Steel} ACTOR Beaver : Chainsaw replaces Chainsaw { Weapon.SlotNumber 1 States { Fire: SAWG AB 4 A_Saw ("weapons/sawfull", "weapons/sawhit", 0, "SteelPuff", SF_NOUSEAMMO, 65, 2.8125, 0, 0) SAWG B 0 A_ReFire GOTO Ready } } Gez, thanks a ton. Seems to work. :) EDIT: Added Weapon.SlotNumber so that I can select the Beaver. 0 Share this post Link to post