[Not needed] Poison Bullet Damage for Monsters

Moderator: Developers

Poison Bullet Damage for Monsters

Postby RV-007 » Fri Jun 15, 2012 7:33 am

I experimented with the string Pufftype's Bulletpuff actor and replaced Bulletpuff with a poison projectile. Works pretty well with weapons. Unfortunately, monster attacks don't have the same capability. I'm sure I can make all kinds of status effects by corrupting the powerups for teh string Pufftype, but I also want instant-like poison bullets too.

Example:
A_CustomBulletAttack (float horz_spread, float vert_spread, int numbullets, int damageperbullet, string pufftype="Poison_Projectile" [, float range [, int flags]])
vvv
Doesn't apply the same to monster attacks.
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: Poison Bullet Damage for Monsters

Postby Blue Shadow » Fri Jun 15, 2012 9:22 am

Can't you use DamageType "Poison" on the puff or projectile?
User avatar
Blue Shadow
 
Joined: 14 Nov 2010

Re: Poison Bullet Damage for Monsters

Postby RV-007 » Fri Jun 15, 2012 6:37 pm

Oh shit! It cakin' works. Blue Shadow, I will put your name in the credits of my dumb doom2 monsterplayers project. I guess some effects for monster attacks need a on/off switch of some sort.

The projectile actor in A_CustomBulletAttack's string Pufftype value really needs a Damagetype of value Poison (for monsters to fire poisonous bullets). The damage done relies on the int damageperbullet value of A_CustomBulletAttack statement and the countdown before expiration relies on the duration value of the PoisonDamage value[, duration[, period]] actor property. The value of the PoisonDamage does not apply to bullets b/c it specifically states that value is for projectiles only as noted within the wiki.
Spoiler: "http://zdoom.org/wiki/Actor_properties#PoisonDamage"

The monster's poison bullet relies on the following links.
http://www.zdoom.org/wiki/Damage_types
http://zdoom.org/wiki/Actor_properties#DamageType
http://zdoom.org/wiki/Actor_properties#PoisonDamage
http://www.zdoom.org/wiki/A_CustomBulletAttack

Below is the code on how a monster's poison bullet works.
Spoiler:
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: Poison Bullet Damage for Monsters

Postby Gez » Sat Jun 16, 2012 4:10 am

RV-007 wrote:
Code: Select allExpand view
ACTOR Pistol_Projectile_MONSTERONLY : Weapon
{
   Game Doom
   Radius 2
   Height 2
   Speed 100
   //Damage 5
   DamageType "Poison"
   PoisonDamage 5,10,0 // PoisionDamage (damage, time [seconds], seconds to kick in damage [zero also equals kicking damage for each second passed])
     Obituary "%o did not feel better with those shots."
     Projectile
     //+NOBLOCKMAP
     //+SEEKERMISSILE
     +ADDITIVEPOISONDAMAGE
     +ADDITIVEPOISONDURATION
     +RANDOMIZE
     +ROCKETTRAIL // Added In
     SeeSound "demon/melee"
     DeathSound "weapons/plasmax"
     RenderStyle None
 
     States
     {
        Spawn:
           //PINV ABCD 3 Bright
           //IFOG DC 1 Bright A_NoBlocking // Added In
         IFOG D 0 A_PlaySound ("weapons/plasmax",4,1.0,0,ATTN_NORM)
           IFOG D 1 Bright A_NoBlocking // Added In
           IFOG C 1 Bright //A_CustomMissile("Poison_Seeker_Projectile",1,0,0,CMF_AIMOFFSET|CMF_AIMDIRECTION,270)
           //Loop
        Death:
           //TFOG FEDCA 4 Bright A_SpawnItem("BossCubeTurrantPanch_Projectile_Jam",1,0,0)
         IFOG AAA 1 Bright
         Stop
     }
}

Why is that thing a weapon?
Gez
 
Joined: 06 Jul 2007

Re: Poison Bullet Damage for Monsters

Postby RV-007 » Sat Jun 16, 2012 7:47 am

I don't really know how to use the weapon class, but I figure that poison is a weapon.
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: Poison Bullet Damage for Monsters

Postby Graf Zahl » Sat Jun 16, 2012 7:56 am

Wrong. A weapon is what your player holds in his hand to fire bullets with. Using special inventory items like you do can cause some problems.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany

Re: Poison Bullet Damage for Monsters

Postby RV-007 » Sat Jun 16, 2012 8:44 am

Okay, thanks for the information. I guess I should inherit from either inventory or custom inventory.
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it

Re: Poison Bullet Damage for Monsters

Postby Gez » Sat Jun 16, 2012 8:59 am

No, not CustomInventory! That one is for scripted effects on Use or Pickup.

And actually, since it's actually projectile, you shouldn't inherit from Inventory either. Just a normal actor.
Gez
 
Joined: 06 Jul 2007

Re: Poison Bullet Damage for Monsters

Postby RV-007 » Sat Jun 16, 2012 9:07 am

Oh yeah, I forgot. Once again, thanks lol.
User avatar
RV-007
^NOOBS of MONOTONY
 
Joined: 02 Sep 2011
Location: Dying w/ civilization or living after it


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 3 guests