How to make casings get crushed?
Posted: Mon Mar 13, 2017 10:02 pm
I have this code for casings which works well and even vanishes on sky flats or makes a splash sound in liquids but doesn't get crushed by doors and such. It looks weird seeing a bunch of casings sitting inside a doorway so I'd prefer them to be crushed, but this code isn't working. I feel like I am missing something simple as to why they aren't being crushed.
EDIT: They also don't move with scrolling floors, which also is weird to see them not move with the floor.
Also, I'd appreciate any feedback on the way I did the casings. Areas for improvement or some other optimization. Mine are built from several other examples I've seen.
EDIT: They also don't move with scrolling floors, which also is weird to see them not move with the floor.
Also, I'd appreciate any feedback on the way I did the casings. Areas for improvement or some other optimization. Mine are built from several other examples I've seen.
Code: Select all
ACTOR BulletCasing
{
Scale 0.25
Height 2
Radius 3
BounceFactor 0.5
WallBounceFactor 0.4
BounceCount 5
BounceSound "casings/bulletbounces"
BounceType Doom
PROJECTILE
-NOGRAVITY
+NOBLOCKMAP
+MOVEWITHSECTOR
+BOUNCEONCEILINGS
-BOUNCEONACTORS
-CANBOUNCEWATER
+EXPLODEONWATER
+NOTELEPORT
+NOTRIGGER
+THRUACTORS
+DROPOFF
+FLOORCLIP
-DONTGIB
+WINDTHRUST
+GHOST
+CORPSE
+CLIENTSIDEONLY
States
{
Spawn:
BCAS FGHABCDE 1
Loop
Death:
TNT1 A 0 A_Jump(255, "Death1", "Death2", "Death3", "Death4", "Death5")
Goto Death1
Death1:
TNT1 A 0
TNT1 A 0 A_JumpIf(CallACS("LiquidCheck") == 1, "DisappearLiquid")
TNT1 A 0 A_JumpIf(CallACS("LiquidCheck") == 2, "Disappear")
BCAS I -1 A_PlaySound("casings/bulletdeaths")
Stop
Death2:
TNT1 A 0
TNT1 A 0 A_JumpIf(CallACS("LiquidCheck") == 1, "DisappearLiquid")
TNT1 A 0 A_JumpIf(CallACS("LiquidCheck") == 2, "Disappear")
BCAS J -1 A_PlaySound("casings/bulletdeaths")
Stop
Death3:
TNT1 A 0
TNT1 A 0 A_JumpIf(CallACS("LiquidCheck") == 1, "DisappearLiquid")
TNT1 A 0 A_JumpIf(CallACS("LiquidCheck") == 2, "Disappear")
BCAS K -1 A_PlaySound("casings/bulletdeaths")
Stop
Death4:
TNT1 A 0
TNT1 A 0 A_JumpIf(CallACS("LiquidCheck") == 1, "DisappearLiquid")
TNT1 A 0 A_JumpIf(CallACS("LiquidCheck") == 2, "Disappear")
BCAS L -1 A_PlaySound("casings/bulletdeaths")
Stop
Death5:
TNT1 A 0
TNT1 A 0 A_JumpIf(CallACS("LiquidCheck") == 1, "DisappearLiquid")
TNT1 A 0 A_JumpIf(CallACS("LiquidCheck") == 2, "Disappear")
BCAS M -1 A_PlaySound("casings/bulletdeaths")
Stop
Disappear:
TNT1 A 0
TNT1 A 1
Stop
DisappearLiquid:
TNT1 A 0
TNT1 A 1 A_PlaySound("casings/liquidhits")
Stop
Crush:
TNT1 A 0
TNT1 A 1
Stop
}
}