Code: Select all
actor RC50 : Weapon
{
tag "RC-50"
obituary "%o was PIERCED by Assassin, %k's Robar RC-50!"
inventory.pickupmessage "Robar RC-50"
attacksound "rc50/fire"
weapon.selectionorder 7
weapon.kickback 50
weapon.ammotype1 "RobarClip"
weapon.ammouse1 1
weapon.ammogive1 0
weapon.ammotype2 "RCAmmo"
weapon.ammouse2 0
weapon.ammogive2 30
decal BulletChip
scale 0.35
+NOAUTOFIRE
states
{
Ready:
ROBF A 0 A_JumpIfInventory("PSGZoom",1,3)
ROBF A 1 A_WeaponReady
ROBF A 0 A_JumpIfNoAmmo("ReloadStart")
loop
ASNS A 1 A_WeaponReady
ASNS A 0 A_JumpIfNoAmmo("ReloadStart")
goto Ready+3
Deselect:
ROBF A 0 A_JumpIfInventory("PSGZoom",1,3)
ROBF A 0 A_TakeInventory("PSGZoom",2)
ROBF A 0 A_Lower
ROBF A 1 A_Lower
loop
ASNS A 1 A_TakeInventory("PSGZoom",2)
ASNS A 7
ROBF A 3
loop
Select:
ROBF A 0 A_PlaySound("rc50/select")
ROBF A 1 A_Raise
goto Select+1
Fire:
ROBF A 0 A_JumpIfInventory("PSGZoom",1,"FireZoom")
ROBF A 0 A_JumpIfNoAmmo("ReloadStart")
ROBF A 0 A_TakeInventory("RobarClip",1)
ASNS A 0 BRIGHT A_FireBullets (0.0, 0.0, 1, 1, "HHBulletPuff", 1, 25000)
ROBA A 2 BRIGHT A_RailAttack(random(400,800), 4, 0, none, FFFFFF, 0, 0, "HHBulletPuff")
ROBA A 0 BRIGHT
ROBA B 2 BRIGHT A_GunFlash
ROBA CDEFG 2
ROBF A 3
ROBA A 0 A_JumpIfInventory("RCAmmo",5,1)
goto Ready
ROBA A 0 A_JumpIfNoAmmo("ReloadStart")
ROBA A 0
goto Ready
FireZoom:
ASNS A 0 A_JumpIfNoAmmo("AltFire")
ASNS A 0 BRIGHT A_FireBullets (0.0, 0.0, 1, 1, "HHBulletPuff", 1, 25000)
ASNS A 2 BRIGHT A_RailAttack(random(400,800), 0, 0, none, FFFFFF, 0, 0, "HHBulletPuff")
ASNS A 0 BRIGHT
ASNS A 2 BRIGHT A_GunFlash
ASNS AAAA 2
ASNS A 2
ASNS A 0 A_JumpIfInventory("RCAmmo",5,1)
goto Ready
ASNS A 0 A_JumpIfNoAmmo("ReloadStart")
ASNS A 0
goto Ready
AltFire:
//ROBA A 0 ACS_ExecuteAlways(596,0,0,0,0)
ROBA A 0 A_JumpIfInventory("PSGZoom",1,"ZoomOut")
ASNS A 0 A_GiveInventory("PSGZoom")
ASNS A 0 A_PlaySound("ScopeIn")
ROBA A 0 A_ZoomFactor(5.0,0)
ASNS A 8
ASNS A 1 A_Refire
goto Ready
/*AltHold:
ROBA A 1 A_JumpIfInventory("PSGZoom",1,2)
ROBA A 1 A_ReFire
goto Ready
ASNS A 1
ASNS A 1 A_ReFire
goto Ready*/
ZoomOut:
//ASNS A 0 ACS_ExecuteAlways(597,0,0,0,0)
ASNS A 1 A_TakeInventory("PSGZoom",1)
ASNS A 0 A_PlaySound("ScopeOut")
ROBA A 0 A_ZoomFactor(1.0,0)
ASNS A 7
ROBF A 2
ROBF A 1 A_Refire
goto Ready
ReloadStart:
ROBA A 0 A_JumpIfInventory("PSGZoom",1,"ReloadStartZoom")
ROBA A 0 A_JumpIfInventory("RCAmmo",5,2)
ROBA A 0
goto NoAmmo
ROBA HIJKLMNPQR 2
goto ReloadAmmo
ReloadAmmo:
ROBA M 0 A_GiveInventory("RobarClip",1)
ROBA M 0 A_TakeInventory("RCAmmo",1)
ROBA M 0 A_JumpIfInventory("RobarClip",1,"ReloadEnd")
ROBA M 0 A_JumpIfInventory("RCAmmo",1,"ReloadAmmo")
goto ReloadEnd
ReloadEnd:
ROBA S 2 A_PlaySound("rc50/boltopen")
ROBA T 4
ROBA RQ 2
ROBA P 2 A_PlaySound("rc50/boltclose")
ROBA NMLKJIH 2
ROBA A 0
goto Ready
Flash:
TNT1 A 2 bright A_Light2
TNT1 A 2 bright A_Light1
TNT1 A 0 bright A_Light0
stop
ReloadStartZoom:
ROBA A 0 A_PlaySound("ScopeOut")
ROBA A 0 A_ZoomFactor(1.0,0)
ROBA A 0 A_JumpIfInventory("RCAmmo",5,2)
goto Ready
ROBA A 0
goto NoAmmo
ASNS A 1 A_TakeInventory("PSGZoom",2)
ASNS A 7
ROBF A 2
ROBA HIJKLMNPQR 2
goto ReloadAmmoZoom
ReloadAmmoZoom:
ROBA M 0 A_GiveInventory("RobarClip",1)
ROBA M 0 A_TakeInventory("RCAmmo",1)
ROBA M 0 A_JumpIfInventory("RobarClip",1,"ReloadEndZoom")
ROBA M 0 A_JumpIfInventory("RCAmmo",5,"ReloadAmmoZoom")
goto ReloadEndZoom
ReloadEndZoom:
ROBA S 2 A_PlaySound("rc50/boltopen")
ROBA T 4
ROBA RQ 2
ROBA P 2 A_PlaySound("rc50/boltclose")
ROBA NMLKJIH 2
ROBA A 0 A_ZoomFactor(5.0,0)
//ROBA A 0 A_ReFire
goto AltFire
NoAmmo:
ROBF A 1
ROBF A 0 A_SelectWeapon("M9")
ROBF A 0 A_SelectWeapon("M90")
ROBF A 0 A_SelectWeapon("MP5")
ROBF A 0 A_SelectWeapon("P90")
ROBF A 0 A_SelectWeapon("M16")
ROBF A 10 A_SelectWeapon("HK69")
goto Deselect
Spawn:
ROBP ABCDEFGHIJKL 3
loop
}
}
actor RobarClip : Ammo
{
inventory.icon "AMM2A0"
inventory.amount 0
inventory.maxamount 1
ammo.backpackamount 0
ammo.backpackmaxamount 1
}
actor PSGZoom : Inventory
{
inventory.amount 0
inventory.maxamount 2
}