Page 1 of 1

A Missile FIring Multiple Missiles on it's Death State.

Posted: Thu Mar 30, 2006 5:46
by solarsnowfall
I used to be able to send multiple projectiles flying simultaneously.

Code: Select all

Death:
    TNT1 A 1 A_CustomMissile("SaidMissile", 0, 0, random(90,270), 2, random(90,270))
    TNT1 B 0 A_CustomMissile("SaidMissile", 0, 0, random(90,270), 2, random(90,270))
    TNT1 C 0 A_CustomMissile("SaidMissile", 0, 0, random(90,270), 2, random(90,270))
    TNT1 D 0 A_CustomMissile("SaidMissile", 0, 0, random(90,270), 2, random(90,270))
But when testing that, it only fires one projectile, ever, or at least only draws one projecile on the screen. If I look on the automap, I can see the projectiles flying away from the parent projectile, but not on the screen. The closest I can get it to working the way I want is like this.

Code: Select all

Death:
    TNT1 A 1 A_CustomMissile("SaidMissile", 0, 0, random(90,270), 2, random(90,270))
    TNT1 B 1 A_CustomMissile("SaidMissile", 0, 0, random(90,270), 2, random(90,270))
    TNT1 C 1 A_CustomMissile("SaidMissile", 0, 0, random(90,270), 2, random(90,270))
    TNT1 D 1 A_CustomMissile("SaidMissile", 0, 0, random(90,270), 2, random(90,270))
This will give a visual representation of all the projectiles firing from the parent projectile, but it's no longer at the same time, which sorta destroys the effect I was going for. What am I missing here? I know I've done exactly the same thing in prior versions.

Code: Select all

Actor SaidMissile 
{
    Speed 2
    +NoCLip
    +NoGravity
    +Missile
    States
    {
    Spawn:
    	FRAM A 16 A_CustomMissile("ATailMissile", 0, 0, 0)    	
       Stop
    }
}
That's essentially the missile that is getting fired.

Posted: Thu Mar 30, 2006 13:29
by Eriance
I'm also getting the same issues or similar issues with this. It's usually random. I copy and paste a projectile and change the cane; some would work while others wont. Which I find odd.

I'm also having a problem where i use A_CustomMissile to spawn a smoke trail, some projectiles stop spawning the trail after awhile.

As for your second problem, Doom randomizes the starting frames of projectiles. So I think You should have TWO frames doing the same thing in a loop and use A_CountDown to kill it instead. That might work better.

Posted: Thu Mar 30, 2006 14:38
by solarsnowfall
Second problem? There's 16 frames there. I just condensed it down like that for the purposes of posting it here. Again, I'm trying to fire multiple missiles from another missile on it's death state. These need to all happen at once, there need not be any loop. Any delay in time between any of the missiles being fired ruins what is otherwise a very visually satisfying effect. I know I've done this before in prior versions, with almost exactly the same code.

Is there some sort of internal limitation I could be hitting?

Posted: Thu Mar 30, 2006 16:06
by Graf Zahl
Eriance wrote: I'm also having a problem where i use A_CustomMissile to spawn a smoke trail, some projectiles stop spawning the trail after awhile.
That can happen if the projectile's owner disappears. In that case there's nothing to shoot at. Use A_SpawnItem for things like this as A_CustomMissile was designed for other purposes.
As for your second problem, Doom randomizes the starting frames of projectiles. So I think You should have TWO frames doing the same thing in a loop and use A_CountDown to kill it instead. That might work better.
ZDoom only randomizes the first frame if you tell it explicitly to do so by using the RANDOMIZE flag.


@Solarsnowfall:

Your condensing of the script code is self-defeating. Some of these issues are not that trivial so it'd be better to post everything.

Posted: Thu Mar 30, 2006 23:58
by solarsnowfall
Ok.[spoiler]

Code: Select all

Actor ZDFImpBall
{
    SpawnId 10
    Radius 6
    Height 8
    Speed 10
    Damage 4
    Renderstyle Add
    SeeSound "imp/attack"
    DeathSound "imp/shotx"
    MissileType "ZDFImpBallTail"
    MissileHeight 0
    PROJECTILE
    States
    {
    Spawn:
    	TNT1 A 1 A_CustomMissile("ZDFImpBallTail", 0, 0, 0)
      	Loop
    Death:
    	TNT1 A 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
    	TNT1 B 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 C 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 D 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 D 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 E 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 E 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 E 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 F 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 F 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 F 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 G 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 G 1
       	TNT1 H 1
       	TNT1 I 1
       	TNT1 J 1
       	TNT1 K 1
       	TNT1 L 1
    	Stop
    }
}

Actor ZDFImpBallTail
{
    +NoClip
    +NoGravity
    +Missile
    Scale 0.35
    RenderStyle Add
    States
    {
    Spawn:
    	FIRE A 1 Bright A_SetTranslucent(0.96, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.8, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor ZDFImpBallExp
{
    Speed 2
    +NoCLip
    +NoGravity
    +Missile
    States
    {
    Spawn:
    	TNT1 A 1 A_CustomMissile("FireA", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireB", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireC", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireD", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireE", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireF", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireG", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireH", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireI", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireJ", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireK", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireL", 0, 0, 0)
    	Stop
    }
}

Actor FireA
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add
    States
    {
    Spawn:
    	FIRE A 12 Bright A_SetTranslucent(0.96, 1)
    	FIRE A 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE A 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE A 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE A 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE A 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE A 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE A 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE A 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE A 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE A 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE A 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor FireB
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add	
    States
    {
    Spawn:
    	FIRE B 11 Bright A_SetTranslucent(0.96, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE B 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor FireC
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add	
    States
    {
    Spawn:
    	FIRE C 10 Bright A_SetTranslucent(0.96, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE C 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor FireD
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add		
    States
    {
    Spawn:
    	FIRE D 9 Bright A_SetTranslucent(0.96, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE D 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor FireE 
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add	
    States
    {
    Spawn:
    	FIRE E 8 Bright A_SetTranslucent(0.96, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE E 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor FireF 
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add	
    States
    {
    Spawn:
    	FIRE F 7 Bright A_SetTranslucent(0.96, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE F 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor FireG
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add	
    States
    {
    Spawn:
    	FIRE G 6 Bright A_SetTranslucent(0.96, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE G 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor FireH
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add	
    States
    {
    Spawn:
    	FIRE H 5 Bright A_SetTranslucent(0.96, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE H 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor FireI
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add	
    States
    {
    Spawn:
    	FIRE I 4 Bright A_SetTranslucent(0.96, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE I 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor FireJ
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add	
    States
    {
    Spawn:
    	FIRE J 3 Bright A_SetTranslucent(0.96, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE J 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor FireK
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add	
    States
    {
    Spawn:
    	FIRE K 2 Bright A_SetTranslucent(0.96, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE K 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}

Actor FireL
{
    +NoClip
    +NoBlockMap
    +NoGravity
    +Missile
    Scale 0.2
    RenderStyle Add	
    States
    {
    Spawn:
    	FIRE L 1 Bright A_SetTranslucent(0.96, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.88, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.80, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.72, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.64, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.56, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.48, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.40, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.32, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.24, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.16, 1)
    	FIRE L 1 Bright A_SetTranslucent(0.08, 1)
    	Stop
    }
}
[/spoiler]

Working.

Code: Select all

Actor ZDFImpBallExp
{
    Speed 2
    +NoCLip
    +NoGravity
    +Missile
    States
    {
    Spawn:
    	TNT1 A 1 A_CustomMissile("FireA", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireB", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireC", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireD", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireE", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireF", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireG", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireH", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireI", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireJ", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireK", 0, 0, 0)
    	TNT1 A 1 A_CustomMissile("FireL", 0, 0, 0)
    	Stop
    }
}
Nonworking

Code: Select all

Actor ZDFImpBallExp
{
    Speed 2
    +NoCLip
    +NoGravity
    +Missile
    States
    {
    Spawn:
    	TNT1 A 1 A_CustomMissile("FireA", 0, 0, 0)
    	TNT1 A 0 A_CustomMissile("FireB", 0, 0, 0)
    	TNT1 A 0 A_CustomMissile("FireC", 0, 0, 0)
    	TNT1 A 0 A_CustomMissile("FireD", 0, 0, 0)
    	TNT1 A 0 A_CustomMissile("FireE", 0, 0, 0)
    	TNT1 A 0 A_CustomMissile("FireF", 0, 0, 0)
    	TNT1 A 0 A_CustomMissile("FireG", 0, 0, 0)
    	TNT1 A 0 A_CustomMissile("FireH", 0, 0, 0)
    	TNT1 A 0 A_CustomMissile("FireI", 0, 0, 0)
    	TNT1 A 0 A_CustomMissile("FireJ", 0, 0, 0)
    	TNT1 A 0 A_CustomMissile("FireK", 0, 0, 0)
    	TNT1 A 0 A_CustomMissile("FireL", 0, 0, 0)
    	Stop
    }
}

Posted: Fri Mar 31, 2006 0:09
by Graf Zahl
Make sure that the last state has a non-zero duration. Otherwise strange things can happen because some stuff happens after the projectile has been destroyed. Your projectiles aren't spawned simultaneously anyway. There's a delay between the first and the others.

Posted: Fri Mar 31, 2006 0:49
by solarsnowfall
Oh dang, I thought the delay happened before the command was executed. In otherwords, it delayed 1 tic, then started firing the missiles.

In a hurry out the door this morning, I sited the wrong code. :oops: And quite badly I might add.

This is actually where I run into a problem.

Code: Select all

Actor ZDFImpBall
{
    SpawnId 10
    Radius 6
    Height 8
    Speed 10
    Damage 4
    Renderstyle Add
    SeeSound "imp/attack"
    DeathSound "imp/shotx"
    MissileType "ZDFImpBallTail"
    MissileHeight 0
    PROJECTILE
    States
    {
    Spawn:
    	TNT1 A 1 A_CustomMissile("ZDFImpBallTail", 0, 0, 0)
      	Loop
    Death:
    	TNT1 A 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
    	TNT1 B 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 C 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 D 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 D 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 E 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 E 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 E 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 F 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 F 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 F 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 G 1 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 G 1
       	TNT1 H 1
       	TNT1 I 1
       	TNT1 J 1
       	TNT1 K 1
       	TNT1 L 1
    	Stop
    }
}
I got it working the way I like as this.

Code: Select all

Actor ZDFImpBall
{
    SpawnId 10
    Radius 6
    Height 8
    Speed 10
    Damage 4
    Renderstyle Add
    SeeSound "imp/attack"
    DeathSound "imp/shotx"
    MissileType "ZDFImpBallTail"
    MissileHeight 0
    PROJECTILE
    States
    {
    Spawn:
    	TNT1 A 1 A_CustomMissile("ZDFImpBallTail", 0, 0, 0)
      	Loop
    Death:
    	TNT1 A 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
    	TNT1 B 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 C 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 D 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 D 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 E 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 E 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 E 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 F 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 F 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 F 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 G 0 A_CustomMissile("ZDFImpBallExp", 0, 0, random(90,270), 2, random(90,270))
      	TNT1 G 1
       	TNT1 H 1
       	TNT1 I 1
       	TNT1 J 1
       	TNT1 K 1
       	TNT1 L 1
    	Stop
    }
}
Thanks for the tip.

Posted: Sat Apr 01, 2006 18:44
by wildweasel
Why are you incrementing the frame letter on the TNT1 sprite? I think perhaps GZDoom is ignoring these frames because the graphics for them don't exist (i.e. TNT1B0, TNT1C0, etc).

Posted: Sun Apr 02, 2006 7:28
by solarsnowfall
GZDoom recognizes them alright, at least as far as light definitions are conserned. Idealy I would have a cumulative lighting effect based on each missile being fired in the death state. But that would be a lot of lights being rendered, I saw this as an easy way to index the light values for this projectile. It works very well in that respect.