Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Filystyn

Barrel problem - damage type

Recommended Posts

I need barrel to do certain damage type when it explodes.
I set it but it seems not to WORK

My aproach that faild:

Actor BarrelNew1M7 replaces ExplosiveBarrel
{

Health 100
Radius 10
Height 42
PainChance "BarrelDamage", 256
Mass 300
PainThreshold 1
DamageType "BarrelDamage"

monster
+SOLID
+SHOOTABLE
+NOBLOOD
+ACTIVATEMCROSS
+DONTGIB
+NOICEDEATH
+SLIDESONWALLS

DeathSound "world/barrelx"
Obituary "$OB_BARREL" // "%o went boom."

States
{

Spawn:
BAR1 A 1
Goto See

See:
BAR1 ABCDEFGHIJKLM 3
loop

Pain.BarrelDamage:
FCAN ABCABCABCABCABCABCABCABCABCABCABCABCABCABCABC 2 Bright
FCAN A 0 A_Die

Death:
BEXP B 2 Bright A_Scream
BEXP CD 2 Bright
BEXP EEE 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP EEEEEE 0 Bright A_CustomMissile( "BarrelNew1Cloud4M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP EEEEE 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP EEEEEEEEEE 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP E 2 Bright A_Explode( 20, 400 )


(...)

Share this post


Link to post

Well first of all it's not clear what i wanted to do.

Basically the problem was with maps that have lots of barrels one next to each since explosion produces lots of smoke my poor shitty computer started cryin

Users probably won't blow up so much in same time to reach "lag state" but i had to do something to calm the barrels. So y. I made it this way that they always do damage in their "longest radius" and set them Xdeath. This way when a player shoots barrel it goes puff but when it explodes other barrels will go in xDeath state and blow up slowly. Since it's still bad when they blow up in same time a made a simple randomness.

It fixed everything. Im not happy with this solution but since zandronum is shit this will have to be for now ok. (stronger missiles cause barrel to enter the xDeath state too so this is kind of lame).

If the A_SetDamageType worked i would do it much much better way.

Here is my shitty solution.
It does not need to be monster now probably (in earlier versions i tried to use pain so...) well anyway i might smoothi it later.




Actor BarrelNew1M7 replaces ExplosiveBarrel
{

Health 5
Radius 10
Height 42
PainChance 256
Mass 300
GibHealth 30

monster
+SOLID
+SHOOTABLE
+NOBLOOD
+ACTIVATEMCROSS
+DONTGIB
+NOICEDEATH
+SLIDESONWALLS

DeathSound "world/barrelx"
Obituary "$OB_BARREL" // "%o went boom."

States
{

Spawn:
BAR1 A 1
Goto See

See:
BAR1 ABCDEFGHIJKLM 3
loop


Death:
BEXP B 2 Bright A_Scream
BEXP CD 2 Bright
BEXP EEE 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP EEEEEE 0 Bright A_CustomMissile( "BarrelNew1Cloud4M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP EEEEE 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP EEEEEEEEEE 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP E 0 Bright A_Explode( 40, 150, 0, 0, 150 )
BEXP E 2 Bright A_Explode( 280, 150 )
BEXP FFF 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP FFF 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP FFFFFFF 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP F 2 Bright
BEXP GGG 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP GGG 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP GGGGGG 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP G 2 Bright
BEXP HHH 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP HHH 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP HHHHHH 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP H 2 Bright
BEXP III 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP III 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP IIIIII 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP I 2 Bright
BEXP JJJ 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP JJJ 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP JJJ 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP J 2 Bright
BEXP KKK 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP KKK 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP KKK 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP K 2 Bright
BEXP K 0 Bright A_CustomMissile( "BarrelNew1ExplosionM7", 0, 0 )
BEXP TSTSTSTSTSTS 8 Bright
BEXP U 5 Bright A_CustomMissile( "BarrelNew1CloudM7", 0, 0, 0, CMF_AIMDIRECTION, 90 )
BEXP SRSRSRSRSRSR 8 Bright
BEXP U 5 Bright A_CustomMissile( "BarrelNew1CloudM7", 0, 0, 0, CMF_AIMDIRECTION, 90 )
BEXP R 96 Bright
BEXP U 0 Bright A_CustomMissile( "BarrelNew1CloudM7", 0, 0, 0, CMF_AIMDIRECTION, 90 )
BEXP U -1

XDeath:
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
FCAN C 3 Bright A_Jump(120, 10)
FCAN ABCABCABC 3 Bright
BEXP B 2 Bright A_Scream
BEXP CD 2 Bright
BEXP EEE 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP EEEEEE 0 Bright A_CustomMissile( "BarrelNew1Cloud4M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP EEEEE 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP EEEEEEEEEE 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP E 0 Bright A_Explode( 40, 150, 0, 0, 150 )
BEXP E 2 Bright A_Explode( 260, 150 )
BEXP FFF 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP FFF 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP FFFFFFF 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP F 2 Bright
BEXP GGG 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP GGG 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP GGGGGG 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP G 2 Bright
BEXP HHH 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP HHH 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP HHHHHH 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP H 2 Bright
BEXP III 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP III 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP IIIIII 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP I 2 Bright
BEXP JJJ 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP JJJ 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP JJJ 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP J 2 Bright
BEXP KKK 0 Bright A_CustomMissile( "BarrelNew1Cloud1M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP KKK 0 Bright A_CustomMissile( "BarrelNew1Cloud2M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP KKK 0 Bright A_CustomMissile( "BarrelNew1Cloud3M7", 20, 0, random(0, 360), CMF_AIMDIRECTION, random(-10,90) )
BEXP K 2 Bright
BEXP K 0 Bright A_CustomMissile( "BarrelNew1ExplosionM7", 0, 0 )
BEXP TSTSTSTSTSTS 8 Bright
BEXP U 5 Bright A_CustomMissile( "BarrelNew1CloudM7", 0, 0, 0, CMF_AIMDIRECTION, 90 )
BEXP SRSRSRSRSRSR 8 Bright
BEXP U 5 Bright A_CustomMissile( "BarrelNew1CloudM7", 0, 0, 0, CMF_AIMDIRECTION, 90 )
BEXP R 96 Bright
BEXP U 0 Bright A_CustomMissile( "BarrelNew1CloudM7", 0, 0, 0, CMF_AIMDIRECTION, 90 )
BEXP U -1

}

}

Actor BarrelNew1ExplosionM7 {

Damage 0
Speed 0
Scale 1.15


+THRUACTORS

states {

Spawn:
goto death

Death:
BEXP LMNOPQ 2
stop

}

}


Actor BarrelNew1CloudM7 {

+THRUACTORS
+NOGRAVITY
Speed 2

states {

Spawn:
goto death

Death:
SMK7 ABCDEFGHIJKLMNOPQRSTUVW 3
stop

}

}

Actor BarrelNew1Cloud1M7 : BarrelNew1CloudM7 {

-NOGRAVITY
Gravity 0.125
Speed 5
Scale 1.75
RenderStyle Translucent
Alpha 0.35

}

Actor BarrelNew1Cloud2M7 : BarrelNew1Cloud1M7 {

Alpha 0.6
Speed 7
Scale 1.5

}

Actor BarrelNew1Cloud3M7 : BarrelNew1Cloud1M7 {

Alpha 0.85
Speed 12
Scale 1.25

}


Actor BarrelNew1Cloud4M7 : BarrelNew1Cloud1M7 {

Alpha 0.25
Speed 4
Scale 3

states {

Death:
SMK7 PQRSTUVW 3
stop

}


}

Share this post


Link to post

Tip: Change your barrel's health to at least 15. That way you guarantee that a standard hitscan bullet with damage between 5-15 will never damage the barrel enough to be "gibbed" (put to XDeath state instead of Death), which happens when its health is dragged down below the negative value of its start health in one hit.

Share this post


Link to post
scifista42 said:

Tip: Change your barrel's health to at least 15. That way you guarantee that a standard hitscan bullet with damage between 5-15 will never damage the barrel enough to be "gibbed" (put to XDeath state instead of Death), which happens when its health is dragged down below the negative value of its start health in one hit.



GibHealth 30

abs( 5 - 15 ) < ? 30
yes

As i understand gibhealth is the -health after attac/death that is needed to enter xdeath.

Thx anyway

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×