actor CacodemonBall1 replaces CacodemonBall
{
  Game Doom
  SpawnID 126
  Radius 6
  Height 8
  Speed 10
  FastSpeed 20
  Damage 5
  scale 0.35
  SeeSound "caco/attack"
  DeathSound "caco/shotx"
  Projectile
  +RANDOMIZE
  RenderStyle Add
  Alpha 1
  States
  {
  Spawn:
    CORN DDDD 1 bright A_CustomMissile("cacoballPart1",0,2,0+random(0,360),2,0+random(0,360))
    loop
  Death:
    null aaaaaaaaaaaaaaaaaaaaaaaa 0 A_CustomMissile("cacoballPart2",0,2,0+random(0,360),2,0+random(0,360))
    BAL2 CDE 1 bright A_CustomMissile("cacoballPart2",0,2,0+random(0,360),2,0+random(0,360))
		null aaaaaaaaaaaa 0 A_CustomMissile("BlastSparkPart1",0,2,0+random(0,360),2,0+random(0,360))
		null a 0 A_CustomMissile("BlastFinalSmok",0,2,0+random(0,360),2,90+random(-30,30))		
	    stop
  }
}

actor CacoBallPart1
{
	Radius		1
	Height		1
   Renderstyle Translucent
	Alpha		1
	Scale		0.4
    Speed 0
    PROJECTILE
    +DOOMBOUNCE
	States
	{
	Spawn:
		corn b 1 bright A_SetTranslucent(.5,1)
		corn b 1 bright A_SetTranslucent(.4,1)
		corn b 1 bright A_SetTranslucent(.3,1)
	    corn b 1 bright A_SetTranslucent(.2,1)
		corn b 1 bright A_SetTranslucent(.1,1)
		corn b 1 bright A_SetTranslucent(.07,1)
	    corn b 1 bright A_SetTranslucent(.03,1)
		Stop
	}
}

actor CacoBallPart2
{
	Radius		1
	Height		1
   Renderstyle Translucent
	Alpha		1
	Scale		0.2
    Speed 2
    PROJECTILE
    +DOOMBOUNCE
	States
	{
	Spawn:
		corn d 1 bright A_SetTranslucent(.9,1)
		corn d 1 bright A_SetTranslucent(.8,1)
		corn d 1 bright A_SetTranslucent(.7,1)
	    corn d 1 bright A_SetTranslucent(.6,1)
		corn d 1 bright A_SetTranslucent(.5,1)
		corn d 1 bright A_SetTranslucent(.4,1)
	    corn d 1 bright A_SetTranslucent(.3,1)
		corn d 1 bright A_SetTranslucent(.2,1)
		corn d 1 bright A_SetTranslucent(.1,1)
		corn d 1 bright A_SetTranslucent(.07,1)
	    corn d 1 bright A_SetTranslucent(.03,1)
		Stop
	}
}