Page 1 of 1

Poison Damage?

Posted: Tue Aug 20, 2013 8:00 pm
by Lord_of_D:
would somebody be so kind to explain me how exactly works the poisonus damage? i was trying to make a projectile with "PoisonDamage", but zandronum always gives me error when i lanch the wad D:

RE: Poison Damage?

Posted: Tue Aug 20, 2013 8:03 pm
by Klofkac
The example DECORATE code would be handy.
Well, ZDoom wiki should help you.

RE: Poison Damage?

Posted: Tue Aug 20, 2013 8:08 pm
by The Endertainer
Depends on how you use it. If its for a projectile actor, you just put it in like so:

Code: Select all

Actor ####
{
	Projectile
	PoisonDamage ## //How much damage you want done over time
        The rest of your actor here......
}
If your trying to execute it through bullets (i have seen that done before), i dont know how exactly...... Also im not sure if poison damage affects monsters, if thats how your gonna use it. If all else fails, mayby set the damagetype to poison?

RE: Poison Damage?

Posted: Tue Aug 20, 2013 8:51 pm
by Ænima
Poison damage doesn't affect monsters (only the initial impact damage from the projectile itself).

You'd have to give the monsters a custom Pain state.

RE: Poison Damage?

Posted: Wed Aug 21, 2013 2:13 am
by Lord_of_D:
its for a monster projectile, and heres the code of the projectile:

Code: Select all

Actor HeraldArrow3
{
  Radius 8
  Height 6
  Speed 45
  DamageType "Hero"
  PoisonDamage "15, 10, 2"
  Projectile
  +NoGravity
  +RANDOMIZE
  RenderStyle Add 
  SeeSound "baron/attack"
  DeathSound "baron/shotx"
  States
  {
  Spawn:
   ARBO EF 4 Bright
   Loop
  Death:
   ARBO GHI 6 Bright
   Stop
  }
}
it actually does no damage at all, just hits its target and nothing

RE: Poison Damage?

Posted: Wed Aug 21, 2013 7:27 am
by CloudFlash
Well, you didn't put 'Damage X' in there, so it does no damage. Duh.

RE: Poison Damage?

Posted: Wed Aug 21, 2013 3:49 pm
by Lord_of_D:
CloudFlash wrote: Well, you didn't put 'Damage X' in there, so it does no damage. Duh.
the problem is what if i even put damage to it, the projectile wont give the poison effect, and if i give the other values to PoisonDamage, it gives me an error D:

RE: Poison Damage?

Posted: Wed Aug 21, 2013 4:14 pm
by CloudFlash
Maybe it does the poison effect but monsters dont trigger their pain state? idk much about decorate tbh

RE: Poison Damage?

Posted: Wed Aug 21, 2013 5:48 pm
by Lord_of_D:
CloudFlash wrote: Maybe it does the poison effect but monsters dont trigger their pain state? idk much about decorate tbh
is there another way of giving a poisonus effect?

RE: Poison Damage?

Posted: Wed Aug 21, 2013 6:02 pm
by CloudFlash
Something like

Code: Select all

Actor HeraldArrow3
{
  Radius 8
  Height 6
  Speed 45
  Projectile
  +NoGravity
  +RANDOMIZE
  RenderStyle Add 
  SeeSound "baron/attack"
  DeathSound "baron/shotx"
  States
  {
  Spawn:
   ARBO EF 4 Bright
   Loop
  Death:
   ARBO GHI 6 Bright A_GiveToTarget("Poison", 15)
   Stop
  }
}
Actor Poison : Inventory
{
  States
  {
  Spawn:
TNT1 A 0
   Loop
  }
}
ACTOR monster : monster is some monster.
 States
  {
  Spawn:
  See:
    BOSS AABBCCDD 3 A_Chase
   BOSS A 0 A_JumpIfInventory("poison",1,"getpoisoned")
    Loop
  Pain:
    BOSS H 2
    BOSS H 2 A_Pain
    Goto See
getpoisoned:
BOSS H 0 A_TakeInventory("Health", 5)
goto Pain
  }
}
Code is bad. But you should know what it means

RE: Poison Damage?

Posted: Wed Aug 21, 2013 7:05 pm
by Lord_of_D:
yeah, i think to understand it, i'll give it a try. if someone else can give another example, that would be great

RE: Poison Damage?

Posted: Wed Aug 21, 2013 7:55 pm
by The Endertainer
CloudFlash wrote:

Code: Select all

Actor HeraldArrow3
{
  Radius 8
  Height 6
  Speed 45
  Projectile
  +NoGravity
  +RANDOMIZE
  RenderStyle Add 
  SeeSound "baron/attack"
  DeathSound "baron/shotx"
  States
  {
  Spawn:
   ARBO EF 4 Bright
   Loop
  Death:
   ARBO GHI 6 Bright
   Stop
  }
}
Actor Poison : Inventory
{
  States
  {
  Spawn:
TNT1 A 0
   Loop
  }
}
ACTOR monster : monster is some monster.
 States
  {
  Spawn:
  See:
    BOSS AABBCCDD 3 A_Chase
   BOSS A 0 A_JumpIfInventory("poison",1,"getpoisoned")
    Loop
  Pain:
    BOSS H 2
    BOSS H 2 A_Pain
    Goto See
getpoisoned:
BOSS H 0 A_TakeInventory("Health", 5)
goto Pain
  }
}
Actually that would just do 5 extra damage to the monster, not to mention he needs to finish his "see" state in order for the damage to take effect. Now im not an expert on monsters, but i wiped something up real quick (Not tested btw):

Code: Select all

Actor HeraldArrow3
{
  Damage ##
  Radius 8
  Height 6
  Speed 45
  Projectile
  +NoGravity
  +RANDOMIZE
  RenderStyle Add 
  SeeSound "baron/attack"
  DeathSound "baron/shotx"
  DamageType "Poison"
  States
  {
  Spawn:
   ARBO EF 4 Bright
   Loop
  Death:
   ARBO GHI 6 Bright A_GiveToTarget("Poison", 15)
   Stop
  }
}


ACTOR monster
{
 Stuff about your monster........
 Painchance "poison" 255
 States
  {
  Spawn:
  See:
    BOSS AABBCCDD 3 A_Chase
    Loop
  Pain:
    BOSS H 2
    BOSS H 2 A_Pain
    Goto See
Pain.Poison:
    TNT1 A 0 A_GiveInventory("PoisonDamage", 1)//Make this a "powerup" that takes health over time
    BOSS H 2
    BOSS H 2 A_Pain
    Goto See
  }
}
I dont know if this is gonna work, im on a computer wich is not at home right now (no slade3 D:) so i cant test it. Another problem with poison damage is that you would have to edit every single monster in the game to give them a poison pain state. There might be another way through ACS, but im not positive.

RE: Poison Damage?

Posted: Thu Aug 22, 2013 1:16 am
by Lord_of_D:
this is not a projectile for a weapon, this is a projectile what a monster shoots, so i dont really care about poisoning monsters, what i actually care is about poisoning players D:

RE: Poison Damage?

Posted: Thu Aug 22, 2013 7:57 am
by CloudFlash
So just copy the parts from monster which contain anything about poisons and put them on player classes in the same states. Seriously, thinking doesn't hurt that much ._.

RE: Poison Damage?

Posted: Thu Aug 22, 2013 5:45 pm
by Cruduxy
Laziest way without any thinking is inheriting from http://www.zdoom.org/wiki/Classes:CStaffMissile .Well this should make the projectile poison any player hit with it.