Shortly after firing with primary fire, the secondary fire option is activated.
Here's the code:
Code: Select all
States
{
Ready:
RIFL A 2 A_WeaponReady
RIFL A 0 A_GiveInventory("RocketIn",1)
loop
Select:
RIFL A 1 A_Raise
loop
Deselect:
RIFL A 1 A_Lower
loop
Fire:
RIFL A 1 bright A_FireBullets(5,5,1,15)
RIFL A 0 bright A_PlaySound("Automat/fire")
RIFL B 1 bright A_FireCustomMissile("Projectile")
RIFL A 1 Offset(3,0) bright A_TakeInventory("Clip",1)
RIFL A 1 Offset(6,0) bright
RIFL A 1 Offset(9,0) bright
RIFL A 1 Offset(12,0) bright
RIFL A 1 Offset(9,0) bright
RIFL A 1 Offset(6,0) bright
RIFL A 1 Offset(3,0) bright
RIFL A 1 A_Refire
Altfire:
RIFL A 1 A_JumpIfInventory("RocketIn",100,"Rocket")
RIFL A 1
goto Ready
Rocket:
SRIF ABCD 2 bright
RIF2 A 2 bright A_TakeInventory("RocketIn",100)
RIF2 B 2 bright A_FireMissile
RIF2 A 2 bright
SRIF DCBA 2 bright
goto Ready
}"Projectile" is a projectile related to alerting monsters.