Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ACTOR ModernPistol : Weapon
- {
- Weapon.SelectionOrder 90
- Weapon.AmmoUse 1
- Weapon.AmmoGive 30
- Weapon.AmmoType "Modern9mmLoaded"
- Weapon.AmmoType2 "ModernAmmo1"
- Weapon.SlotNumber 2
- Inventory.RestrictedTo "ModernDude"
- Inventory.PickupMessage "Pistol!"
- Obituary "%k took %o down."
- States
- {
- Ready:
- MD01 A 1 A_WeaponReady(WRF_ALLOWRELOAD)
- Loop
- Deselect:
- MD01 A 1 A_Lower
- Loop
- Select:
- MD01 A 1 A_Raise
- Loop
- Fire:
- MD01 B 0 Bright A_PlaySound("MD01/Fire")
- MD01 B 0 Bright A_FireBullets(5,3,1,5)
- MD01 B 1 Bright A_SetPitch (pitch-0.8)
- MD01 CBAA 1 Bright A_SetPitch (pitch+0.2)
- MD01 A 6
- MD01 A 0 A_JumpIfNoAmmo("Reload")
- MD01 A 0 A_Refire
- Goto Ready
- AltFire:
- MD01 DEF 1
- TNT1 A 5
- MDKF ABC 1
- MDKF DEF 1 A_Saw("Nil", "RGKF/Fire", 5, "FistPuff")
- MDKF GHI 1
- TNT1 A 7
- MD01 FED 1
- MD01 A 5 A_Refire
- Goto Ready
- Reload:
- TNT1 A 0 A_JumpIfInventory("Modern9mmLoaded", 15, "Ready")
- TNT1 A 0 A_JumpIfInventory("ModernAmmo1",1,2) // Check if there are magazines left, if so jump 2 frames.
- MD01 D 1 // This line is important, to prevent crashes.
- Goto Ready // The weapon will get caught here if there are no ammo reserves left.
- MD01 EF 1 // The jump will land here if the reserve check is passed.
- TNT1 A 24
- TNT1 A 0 A_TakeInventory("ModernAmmo1", 1)
- TNT1 A 0 A_TakeInventory("Modern9mmLoaded", 15)
- TNT1 A 0 A_GiveInventory("Modern9mmLoaded", 15)
- TNT1 A 0 A_PlaySound("Weapon/Reload")
- MD01 FED 1
- Goto Ready
- NoAmmoReload:
- MD01 A 0
- Goto Ready
- Spawn:
- SLT1 A -1 Bright
- Stop
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement