If you are looking for a weapon able to make more than 2 attacks here is an example, hoping you will understand it.
Code: Select all
ACTOR Belphegor-Weapons : Weapon
{
+WEAPON.DONTBOB
+WEAPON.CHEATNOTWEAPON
+WEAPON.AMMO_OPTIONAL
+WEAPON.ALT_AMMO_OPTIONAL
+INVENTORY.UNDROPPABLE
States
{
Ready:
TNT1 A 0 A_GiveInventory("CanHold",1)
TNT1 A 0 A_GiveInventory("CanHalfHold",1)
TNT1 A 0 A_TakeInventory("AttackCharge",10)
BH2D A 1 Bright A_WeaponReady
Loop
Deselect:
BH2D A 1 Bright A_Lower
Loop
Select:
BH2D A 1 Bright A_Raise
Loop
Fire:
BH2D A 1 Bright A_JumpIfInventory("AttackCharge",10,"Fire3")
BH2D A 0 A_GiveInventory("AttackCharge",1)
BH2D A 1 Bright
BH2D A 1 Bright A_Refire
Fire1:
BH2D B 0 A_JumpIfInventory("AttackCharge",10,"Fire3")
BH2D B 0 A_JumpIfInventory("AttackCharge",5,"Fire2")
BH2D B 0 A_TakeInventory("AttackCharge",10)
BH2D BCD 2 Bright
BH2D E 0 A_FireCustomMissile("PlayerCyNobleBall",0,1,0)
BH2D E 0 A_FireCustomMissile("PlayerCyNobleBall",-4,1,0)
BH2D E 3 Bright A_FireCustomMissile("PlayerCyNobleBall",4,1,0)
BH2D FBCD 2 Bright
BH2D E 0 A_FireCustomMissile("PlayerCyNobleBall",0,1,0)
BH2D E 0 A_FireCustomMissile("PlayerCyNobleBall",-4,1,0)
BH2D E 3 Bright A_FireCustomMissile("PlayerCyNobleBall",4,1,0)
BH2D FGHZ 2 Bright
Goto Ready
Fire2:
BH2D B 0 A_GiveInventory("MissileType2")
BH2D B 0 A_GunFlash
BH2D BCD 3 Bright
BH2D EEEEE 0 A_FireCustomMissile("PlayerKnightFastBall",random(-8,8),1,0)
BH2D E 5 Bright A_FireCustomMissile("PlayerKnightFastBall",0,1,0)
BH2D FBCD 3 Bright
BH2D EEEEE 0 A_FireCustomMissile("PlayerKnightFastBall",random(-8,8),1,0)
BH2D E 5 Bright A_FireCustomMissile("PlayerKnightFastBall",0,1,0)
BH2D FBCD 3 Bright
BH2D EEEEE 0 A_FireCustomMissile("PlayerKnightFastBall",random(-8,8),1,0)
BH2D E 5 Bright A_FireCustomMissile("PlayerKnightFastBall",0,1,0)
BH2D FGH 3 Bright
BH2D Z 3 Bright A_TakeInventory("AttackCharge",10)
Goto Ready
Fire3:
BH2D B 0 A_GiveInventory("MissileType3")
BH2D B 0 A_GunFlash
BH2D BCD 3 Bright
BH2D E 0 A_FireCustomMissile("PlayerDukeBall",-4,1,0)
BH2D E 0 A_FireCustomMissile("PlayerDukeBall",4,1,0)
BH2D E 5 Bright A_FireCustomMissile("PlayerDukeBall",0,1,0)
BH2D FGH 3 Bright
BH2D Z 3 Bright A_TakeInventory("AttackCharge",10)
Goto Ready
AltFire:
BH2D A 1 Bright A_JumpIfInventory("AttackCharge",10,"AltFire3")
BH2D A 0 A_GiveInventory("AttackCharge",1)
BH2D A 1 Bright
BH2D A 1 Bright A_Refire
AltFire1:
BH2D I 0 A_JumpIfInventory("AttackCharge",10,"AltFire3")
BH2D I 0 A_JumpIfInventory("AttackCharge",5,"AltFire2")
BH2D I 0 A_TakeInventory("AttackCharge",10)
BH2D I 0 A_GiveInventory("MissileType4")
BH2D I 0 A_GunFlash
BH2D IJK 4 Bright
BH2D L 0 A_FireCustomMissile("PlayerDukeFireSpawner",12,1,0)
BH2D L 0 A_FireCustomMissile("PlayerDukeFireSpawner",-12,1,0)
BH2D L 5 Bright A_FireCustomMissile("PlayerDukeFireSpawner",0,1,0)
BH2D Z 4 Bright
Goto Ready
AltFire2:
BH2D I 0 A_GiveInventory("MissileType5")
BH2D I 0 A_GunFlash
BH2D IJK 4 Bright
BH2D L 0 A_FireCustomMissile("PlayerHDComet",4,1,0)
BH2D L 0 A_FireCustomMissile("PlayerHDComet",-4,1,0)
BH2D L 10 Bright A_FireCustomMissile("PlayerHDComet",0,1,0)
BH2D Z 4 Bright A_TakeInventory("AttackCharge",10)
Goto Ready
AltFire3:
BH2D A 0 A_GiveInventory("MissileType6")
BH2D A 0 A_GunFlash
BH2D IJK 4 Bright
BH2D LLLLLLLLLLLLLLLL 1 Bright A_SpawnItemEx("PlayerDukeSpike",Random(300,-300),Random(300,-300),0,0,0,0,0,0)
BH2D LLLLLLLLLLLLLLLL 1 Bright A_SpawnItemEx("PlayerDukeSpike",Random(300,-300),Random(300,-300),0,0,0,0,0,0)
BH2D LLLLLLLLLLLLLLLL 1 Bright A_SpawnItemEx("PlayerDukeSpike",Random(300,-300),Random(300,-300),0,0,0,0,0,0)
BH2D LLLLLLLLLLLLLLLL 1 Bright A_SpawnItemEx("PlayerDukeSpike",Random(300,-300),Random(300,-300),0,0,0,0,0,0)
BH2D LLLLLLLLLLLLLLLL 1 Bright A_SpawnItemEx("PlayerDukeSpike",Random(300,-300),Random(300,-300),0,0,0,0,0,0)
BH2D LLLLLLLLLLLLLLLL 1 Bright A_SpawnItemEx("PlayerDukeSpike",Random(300,-300),Random(300,-300),0,0,0,0,0,0)
BH2D LLLLLLLLLLLLLLLL 1 Bright A_SpawnItemEx("PlayerDukeSpike",Random(300,-300),Random(300,-300),0,0,0,0,0,0)
BH2D LLLLLLLLLLLLLLLL 1 Bright A_SpawnItemEx("PlayerDukeSpike",Random(300,-300),Random(300,-300),0,0,0,0,0,0)
BH2D LLLLLLLLLLLLLLLL 1 Bright A_SpawnItemEx("PlayerDukeSpike",Random(300,-300),Random(300,-300),0,0,0,0,0,0)
BH2D L 5 Bright
BH2D Z 4 Bright A_TakeInventory("AttackCharge",10)
Goto Ready
Spawn:
TNT1 A 1
Stop
}
}
ACTOR CanHold : Inventory{Inventory.MaxAmount 1}
ACTOR CanHalfHold : Inventory{Inventory.MaxAmount 1}
ACTOR AttackCharge : Inventory{Inventory.MaxAmount 10}