Customizable Weaponry for ZDoom.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CSuperShotgun.dec 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. actor CSuperShotgun : CWeapon replaces SuperShotgun
  2. {
  3. Weapon.SlotNumber 3
  4. Weapon.AmmoUse1 1
  5. Weapon.AmmoType1 "Shell"
  6. Weapon.AmmoGive1 8
  7. Obituary "$CW_SHOTGN_OBIT"
  8. Tag "$CW_SHOTGN_WTAG"
  9. States
  10. {
  11. Spawn:
  12. SGN2 A -1
  13. stop
  14. // Select //
  15. Select:
  16. SHT2 A 0 A_GiveInventory("DNS")
  17. SHT2 A 1 A_Raise
  18. wait
  19. Deselect:
  20. SHT2 A 0 A_GiveInventory("DNS")
  21. SHT2 A 1 A_Lower
  22. wait
  23. // Ready //
  24. Ready:
  25. TNT1 A 0 A_TakeInventory("DNS")
  26. SHT2 A 1 A_WeaponReady
  27. loop
  28. // Fire //
  29. Fire:
  30. TNT1 A 0 A_JumpIf(CallACS("CW_GETVAL",GV_SSGM1)==1, "Fire2")
  31. TNT1 A 0 A_JumpIfInventory("SSGLoaded",1,"Reload")
  32. SHT2 A 9 A_SetTics(CallACS("CW_GETVAL",GV_SSGF1))
  33. TNT1 A 0 A_AlertMonsters
  34. TNT1 A 0 A_GunFlash
  35. TNT1 A 0 A_PlaySound("weapons/sshotf",1)
  36. TNT1 A 0 A_FireBullets(11.2,7.1,10,2,"BulletPuff")
  37. SHT2 A 7 BRIGHT A_FireBullets(11.2,7.1,10,3,"BulletPuff")
  38. goto Reload
  39. Fire2:
  40. SHT2 A 9 A_SetTics(CallACS("CW_GETVAL",GV_SSGF1))
  41. TNT1 A 0 A_AlertMonsters
  42. TNT1 A 0 A_GunFlash
  43. TNT1 A 0 A_PlaySound("weapons/sshotf",1)
  44. SHT2 A 7 BRIGHT A_FireBullets(5.6,3.55,10,2.5,"BulletPuff")
  45. TNT1 A 0 A_GiveInventory("SSGLoaded",1)
  46. TNT1 A 0 A_JumpIfInventory("SSGLoaded",0,"Reload")
  47. goto Ready
  48. Reload:
  49. SHT2 B 7 A_TakeInventory("SSGLoaded", 999)
  50. SHT2 C 7 A_CheckReload
  51. SHT2 D 7 A_OpenShotgun2
  52. SHT2 E 7
  53. SHT2 F 7 A_LoadShotgun2
  54. SHT2 G 6
  55. SHT2 H 6 A_CloseShotgun2
  56. SHT2 A 5 A_ReFire
  57. goto Ready
  58. Flash:
  59. TNT1 A 0 A_Quake(4, 5, 0, 16, "")
  60. SHT2 I 1 BRIGHT A_SetPitch(pitch-0.7)
  61. SHT2 I 1 BRIGHT A_SetPitch(pitch-0.7)
  62. SHT2 J 1 BRIGHT A_SetPitch(pitch-0.6)
  63. SHT2 J 1 BRIGHT A_SetPitch(pitch+0.6)
  64. TNT1 A 1 A_SetPitch(pitch+0.7)
  65. TNT1 A 1 A_SetPitch(pitch+0.7)
  66. stop
  67. }
  68. }
  69. actor CSuperShotgunCMenu : Weapon
  70. {
  71. +WEAPON.NOALERT
  72. +WEAPON.CHEATNOTWEAPON
  73. Tag "$CW_SHOTGN_WTAG"
  74. States
  75. {
  76. // Select //
  77. Select:
  78. TNT1 A 0 A_GiveInventory("DNS")
  79. SelectLoop:
  80. TNT1 A 0 A_Raise
  81. SHT2 C 1 A_Raise
  82. loop
  83. Deselect:
  84. TNT1 A 0 A_Print("This shouldn't be printed. Please report this.")
  85. TNT1 A 0 A_GiveInventory("DNS")
  86. DeselectLoop:
  87. TNT1 A 0 A_Lower
  88. SHT2 C 1 A_Lower
  89. loop
  90. // Ready //
  91. Ready:
  92. TNT1 A 0 A_GiveInventory("CMenu")
  93. TNT1 A 0 ACS_NamedExecute("CW_MENUOPEN",0,3)
  94. SHT2 C 1 A_WeaponReady(WRF_ALLOWZOOM|WRF_NOSWITCH)
  95. wait
  96. Zoom:
  97. TNT1 A 0 A_TakeInventory("CMenu")
  98. TNT1 A 0 A_TakeInventory("CMenuNext",0x7fffffff)
  99. TNT1 A 0 ACS_NamedExecute("CW_MENUCLOSE",0)
  100. TNT1 A 0 A_Lower
  101. SHT2 C 1 A_Lower
  102. TNT1 A 0 A_Lower
  103. SHT2 C 1 A_Lower
  104. TNT1 A 0 A_Lower
  105. SHT2 C 1 A_Lower
  106. TNT1 A 0 A_Lower
  107. SHT2 C 1 A_Lower
  108. TNT1 A 0 A_Lower
  109. SHT2 C 1 A_Lower
  110. TNT1 A 0 A_SelectWeapon("CSuperShotgun")
  111. TNT1 A 0 A_TakeInventory("CSuperShotgunCMenu")
  112. stop
  113. // Fire //
  114. Fire:
  115. TNT1 A 0 A_JumpIfInventory("CMenuNext",2,"Fire2")
  116. TNT1 A 0 A_GiveInventory("CMenuNext")
  117. SHT2 C 13 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
  118. goto Ready
  119. Fire2:
  120. TNT1 A 0 A_TakeInventory("CMenuNext")
  121. SHT2 C 13 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
  122. goto Ready
  123. }
  124. }