Code: Select all
Actor ~GaussRifle~ : chaingun
{
Weapon.AmmoType RifleBullet
Weapon.AmmoUse 1
Weapon.AmmoGive 0
AttackSound "weapons/rifle"
+WEAPON.NOALERT
states
{
Spawn:
WRIF A -1
Stop
Ready:
NULL A 0 A_JumpIfInventory("zoom",1,"ReadyScope")
ReadyNoScope:
RIFG A 1 A_WeaponReady
Loop
ReadyScope:
SCOP A 1 A_WeaponReady
Loop
Deselect:
NULL A 0 A_TakeInventory("zoom",255)
NULL A 0 A_ZoomFactor(1,ZOOM_INSTANT)
NULL A 0 A_Lower
RIFG A 1 A_Lower
Loop
Select:
NULL A 0 A_TakeInventory("zoom",255)
NULL A 0 A_ZoomFactor(1,ZOOM_INSTANT)
NULL A 0 A_Raise
RIFG A 1 A_Raise
Loop
Fire:
NULL A 0 A_AlertMonsters
NULL A 0 A_JumpIfInventory("zoom",1,"PowerFire")
RIFG A 0 bright A_RailAttack (150 , 0 , 1 , "none" , "none" , 0 , 0 , "bulletpuff")
RIFG A 0 bright A_FireCustomMissile("RifleTrailer",0,0,0,8)
RIFG CB 3 bright
RIFG A 4
RIFG DEFGFED 3
RIFG A 1
RIFG A 0 A_ReFire
Goto Ready
PowerFire:
SCOP A 0 bright A_RailAttack (250 , 0 , 1 , "none" , "none" , 0 , 0 , "bulletpuff")
SCOP A 0 bright A_FireCustomMissile("RifleTrailer",0,0,0,8)
SCOP CB 3 bright
SCOP A 4
SCOP D 21
SCOP A 1
SCOP A 0 A_ReFire
Goto Ready
AltFire:
NULL A 0 A_JumpIfInventory("Zoom",1,"Reset")
Goto AltHold
Reset:
NULL A 0 A_TakeInventory("zoom",255)
SCOP A 10 A_ZoomFactor(1)
Goto Ready
AltHold:
NULL A 0 A_GiveInventory("Zoom",1)
NULL A 0 A_JumpIfInventory("Zoom",5,"Six")
NULL A 0 A_JumpIfInventory("Zoom",4,"Five")
NULL A 0 A_JumpIfInventory("Zoom",3,"Four")
NULL A 0 A_JumpIfInventory("Zoom",2,"Three")
Two:
SCOP A 3 A_ZoomFactor(1.2)
SCOP A 0 A_ReFire
Goto Ready
Three:
SCOP A 3 A_ZoomFactor(1.6)
SCOP A 0 A_ReFire
Goto Ready
Four:
SCOP A 3 A_ZoomFactor(2.5)
SCOP A 0 A_ReFire
Goto Ready
Five:
SCOP A 3 A_ZoomFactor(3.6)
SCOP A 0 A_ReFire
Goto Ready
Six:
SCOP A 3 A_ZoomFactor(5)
SCOP A 0 A_ReFire
Goto Ready
Flash:
TNT1 A 1 Bright A_Light1
TNT1 A 3 Bright A_Light2
TNT1 A 2 A_Light1
Goto LightDone
}
}
Actor Zoom : inventory
{
Inventory.MaxAmount 5
}
Here's my gauss rifle that works like a sniper gun.
RIFG sprites are the nomal gun
SCOP is the zoomed in scope sight
No hacks, no double weapons, multiple levels of zoom.
If my sprite railgun idea gets implemented the two attack functions (shooting rifle trailer and the rail attack) can be made into one.