Wouldn't it be great if we can define a set of zero-frame frames and then call them again and again as a single function?
For instance, suppose I had five different monsters with a standard, slightly complex baron-like attack looking something like this:
Code: Select all
Missile:
MNST E 6 A_FaceTarget
MNST F 4
MNST G 0 A_JumpIfCloser (48, 11)
MNST G 0 A_Jump (256, 1, 4, 7)
MNST G 0 A_CustomMissile ("BaronBall", 32, -5, 0)
MNST G 0 A_CustomMissile ("BaronBall", 32, 5, 0)
MNST G 0 A_Jump (256, 8)
MNST G 0 A_CustomMissile ("BaronBall", 32, -10, 0)
MNST G 0 A_CustomMissile ("BaronBall", 32, 0, 0)
MNST G 0 A_Jump (256, 5)
MNST G 0 A_CustomMissile ("BaronBall", 32, 0, 0)
MNST G 0 A_CustomMissile ("BaronBall", 32, 10, 0)
MNST G 0 A_Jump (256, 2)
MNST G 0 A_FireBullets (4, 4, 1, 4, "ClawPuff", 4, 32) //temp until A_CustomMeleeAttack is available
MNST G 8
goto See
So I thought it would be great if the following were possible:
Code: Select all
action A_MonstAttack
{
MNST G 0 A_JumpIfCloser (48, 8)
MNST G 0 A_Jump (256, 1, 3, 5)
MNST G 0 A_CustomMissile ("BaronBall", 32, -5, 0)
MNST G 0 A_CustomMissile ("BaronBall", 32, 5, 0)
return
MNST G 0 A_CustomMissile ("BaronBall", 32, -10, 0)
MNST G 0 A_CustomMissile ("BaronBall", 32, 0, 0)
return
MNST G 0 A_CustomMissile ("BaronBall", 32, 0, 0)
MNST G 0 A_CustomMissile ("BaronBall", 32, 10, 0)
return
MNST G 0 A_FireBullets (4, 4, 1, 4, "ClawPuff", 4, 32) //temp until A_CustomMeleeAttack is available
return
}
Code: Select all
Missile:
MNST E 6 A_FaceTarget
MNST F 4
MNST G 8 A_MonstAttack
goto See