1 //Thanks to Wildweasel for the Gun Labs tutorials! ( http://gunlabs.blogspot.ro/2011/01/welcome-to-new-doom-armory.html )
4 actor (optional) ZanPistolReplacer : RandomSpawner replaces Pistol {
10 ACTOR SpikeMag : Ammo replaces Clip {
15 Inventory.MaxAmount 288
16 Ammo.BackpackAmount 72
17 Ammo.BackpackMaxAmount 360
18 Inventory.Icon "SPMGA0"
19 Inventory.PickupMessage "Picked up a Spike Mag."
20 Inventory.PickupSound "Ammo/SpikeMagPick"
30 ACTOR SpikeMagBox : SpikeMag /*replaces Clipbox*/ {
35 Inventory.Icon "SPMGA0"
36 Inventory.PickupMessage "Picked up a Spike Box."
37 Inventory.PickupSound "Ammo/SpikeMagPick"
46 Actor SpikeMagDropped {
64 BounceSound "Ammo/SpikeMagBounce"
79 ACTOR SpikeGunLoaded : Ammo {
81 Inventory.MaxAmount 36
83 Ammo.BackpackMaxAmount 36
84 +INVENTORY.IGNORESKILL
88 ACTOR SpikeGun : Weapon /*replaces Chaingun*/ replaces Pistol {
93 +INVENTORY.UNDROPPABLE
96 //+WEAPON.NO_AUTO_SWITCH
98 Inventory.PickupMessage "Got a Spike Gun."
99 Inventory.PickupSound "Ammo/SpikeGunPick"
100 //Inventory.Icon "SPGIA0"
103 Weapon.SelectionOrder 4
104 //Weapon.MinSelectionAmmo1 0
105 //Weapon.MinSelectionAmmo2 0
106 Weapon.AmmoType1 "SpikeGunLoaded"
109 Weapon.AmmoType2 "SpikeMag"
113 //Decal "SpikeDecalHot"
114 //AttackSound "weapons/spikegunfire"
116 var int user_lowPauseCount;
124 // always has some loaded ammo on first pickup
125 TNT1 A 0 A_GiveInventory("SpikeGunLoaded", random(1, 3)*10)
129 stateinclude "QuickKick/QuickKickOnSelectDeselect.txt"
132 A_GiveInventory("HoldingSpikeGun", 1);
133 if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(3);
135 WSPI A 0 A_Raise(666)
139 stateinclude "QuickKick/QuickKickOnSelectDeselect.txt"
142 A_TakeInventory("SpikeGunZoomed", 1);
144 A_TakeInventory("SpikeGunHeat", 36);
146 WSPI A 1 Offset(-15, 40)
147 WSPI A 1 Offset(-30, 50)
148 WSPI A 1 Offset(-50, 65)
149 WSPI A 1 Offset(-70, 80)
153 TNT1 A 0 A_TakeInventory("HoldingSpikeGun", 1)
154 TNT1 A 1 A_Lower(666) // was zero duration
159 TNT1 A 0 A_PlaySound("Ammo/SpikeGunPick", CHAN_WEAPON, 0.6)
160 WSPI A 1 Offset(-70, 80)
161 WSPI A 1 Offset(-50, 65)
162 WSPI A 1 Offset(-30, 50)
163 WSPI A 1 Offset(-15, 40)
164 TNT1 A 0 A_TakeInventory("QuickKickDisabled")
171 if (CountInv("SpikeGunLoaded") <= 8) {
172 user_lowPauseCount -= 1;
173 if (user_lowPauseCount < 1) {
174 if (user_lowPauseCount > -666 && GetCVarB("k8ZanMod_WarnLowAmmo")) {
175 A_PlaySound("weapons/zanweapon/lowammo", CHAN_VOICE, 1.0);
177 local ammoCount = CountInv("SpikeGunLoaded");
178 if (ammoCount > 6) user_lowPauseCount = 40;
179 else if (ammoCount > 4) user_lowPauseCount = 30;
180 else if (ammoCount > 0) user_lowPauseCount = 20;
181 else user_lowPauseCount = 10;
185 WSPI A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "ReadyZoomed")
186 TNT1 A 0 Offset(-15, 40) { if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(3); }
187 WSPI A 1 A_WeaponReady(WRF_ALLOWRELOAD|(GetCVarB('k8ZanMod_SpikeZoom') ? 0 : WRF_SECONDARY_SAME_AMMO))
188 TNT1 A 0 A_JumpIfInventory("SpikeGunHeat", 29, "Steaming")
194 A_TakeInventory("SpikeGunHeat", 1);
195 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 150);
197 WSPI A 4 A_WeaponReady(WRF_ALLOWRELOAD|(GetCVarB('k8ZanMod_SpikeZoom') ? 0 : WRF_SECONDARY_SAME_AMMO))
201 WSPS A 1 Offset(10000, 32) A_WeaponReady(WRF_ALLOWRELOAD|(GetCVarB('k8ZanMod_SpikeZoom') ? 0 : WRF_SECONDARY_SAME_AMMO))
202 TNT1 A 0 A_JumpIfInventory("SpikeGunHeat", 29, "ZoomSteaming")
208 A_TakeInventory("SpikeGunHeat", 1);
209 A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 150);
211 WSPS A 4 A_WeaponReady(WRF_ALLOWRELOAD|(GetCVarB('k8ZanMod_SpikeZoom') ? 0 : WRF_SECONDARY_SAME_AMMO))
215 WSPI A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "UnZoom")
218 if (!GetCVarB('k8ZanMod_SpikeZoom')) {
219 A_Jump(256, "FireZoomed");
220 } else if (GetCVarB('k8ZanMod_CustomCrosshairs')) {
224 WSPI A 1 Offset(10000, 36)
225 WSPI A 1 Offset(10000, 42)
226 WSPI A 1 Offset(10000, 48)
227 TNT1 A 0 A_ZoomFactor(2)
228 WSPS A 1 Offset(10000, 48)
229 WSPS A 1 Offset(10000, 40)
230 WSPS A 1 Offset(10000, 35)
231 WSPS A 1 Offset(10000, 32)
232 TNT1 A 0 A_GiveInventory("SpikeGunZoomed", 1)
236 WSPS A 4 A_TakeInventory("SpikeGunZoomed", 1)
237 WSPS A 1 Offset(10000, 32)
238 WSPS A 1 Offset(10000, 35)
239 WSPS A 1 Offset(10000, 40)
240 WSPS A 1 Offset(10000, 48)
241 TNT1 A 0 A_ZoomFactor(1)
242 WSPI A 1 Offset(-15, 48)
243 WSPI A 1 Offset(-15, 42)
244 WSPI A 1 Offset(-15, 36)
248 TNT1 A 0 A_JumpIfNoAmmo("Reload")
249 TNT1 A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "FireZoomed")
250 TNT1 A 0 A_JumpIf(waterlevel==3, "WaterFire")
253 user_lowPauseCount = -666;
255 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
256 A_SetPitch(-0.50+pitch);
258 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
259 WSPF A 1 A_FireProjectile("SpikeShot", frandom(-0.5, 0.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(-0.5, 0.5))
263 A_GiveInventory("SpikeGunHeat", 1);
264 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
265 A_SetPitch(-0.30+pitch);
267 //WSPI A 1 A_FireBullets(1, 1, 0, 3*random(2, 3), "HammerPuff", FPF_NOAUTOAIM)
268 WSPF B 2 Offset(0, 33)
269 WSPF B 0 A_SetPitch(0.40+pitch)
270 WSPF C 2 Offset(0, 34) //A_ReFire
273 A_SetPitch(0.40+pitch);
279 TNT1 A 0 A_JumpIfNoAmmo("Reload")
280 TNT1 A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "FireZoomed")
283 user_lowPauseCount = -666;
284 A_GunFlash("Flash"); //k8: i restored underwater flash
285 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
286 A_SetPitch(-0.2+pitch);
288 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
289 WSPF A 1 A_FireProjectile("SpikeShotUnderwater", frandom(-0.7, 0.7), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(-0.7, 0.7))
291 TNT1 A 0 A_SetPitch(0.1+pitch)
292 //WSPI A 1 A_FireBullets(1, 1, 0, 3*random(2, 3), "HammerPuff", FPF_NOAUTOAIM)
293 WSPF B 2 Offset(0, 33)
294 WSPF C 2 Offset(0, 34) //A_ReFire
295 TNT1 A 0 A_SetPitch(0.1+pitch)
296 TNT1 A 0 //A_AlertMonsters
300 TNT1 A 0 A_JumpIfNoAmmo("Reload")
301 TNT1 A 0 A_JumpIf(waterlevel==3, "WaterFireZoomed")
304 user_lowPauseCount = -666;
305 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
306 A_SetPitch(-0.20+pitch);
308 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
309 WSPS A 1 A_FireProjectile("SpikeShotAimed", frandom(-0.1, 0.1), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.2, 0.2))
312 A_GiveInventory("SpikeGunHeat", 1);
313 A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
315 WSPS A 1 Offset(0, 33)
316 WSPS A 0 A_SetPitch(0.10+pitch)
317 WSPS A 1 Offset(0, 34)
320 A_SetPitch(0.10+pitch);
323 WSPS A 0 A_JumpIfNoAmmo("Reload")
324 WSPS A 0 A_JumpIf(waterlevel==3, "WaterFireZoomed")
325 WSPS A 0 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON)
326 WSPS A 0 A_SetPitch(-0.20+pitch)
327 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
328 WSPS A 1 A_FireProjectile("SpikeShotAimed", frandom(-0.1, 0.1), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.2, 0.2))
331 A_GiveInventory("SpikeGunHeat", 1);
332 A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
334 WSPS A 1 Offset(0, 33)
335 WSPS A 0 A_SetPitch(0.10+pitch)
336 WSPS A 1 Offset(0, 34)
339 A_SetPitch(0.10+pitch);
342 WSPS A 0 A_JumpIfNoAmmo("Reload")
343 WSPS A 0 A_JumpIf(waterlevel==3, "WaterFireZoomed")
346 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
347 A_SetPitch(-0.20+pitch);
349 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
350 WSPS A 1 A_FireProjectile("SpikeShotAimed", frandom(-0.1, 0.1), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.2, 0.2))
353 A_GiveInventory("SpikeGunHeat", 1);
354 A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
356 WSPS A 1 Offset(0, 33)
357 WSPS A 0 A_SetPitch(0.10+pitch)
358 WSPS A 1 Offset(0, 34)
361 A_SetPitch(0.10+pitch);
367 TNT1 A 0 A_JumpIfNoAmmo("Reload")
370 user_lowPauseCount = -666;
371 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
372 A_SetPitch(-0.1+pitch);
374 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
375 WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
376 WSPS A 1 Offset(0, 33)
377 WSPS A 0 A_SetPitch(0.05+pitch)
378 WSPS A 1 Offset(0, 34)
379 WSPS A 0 A_SetPitch(0.05+pitch)
380 WSPS A 0 A_JumpIfNoAmmo("Reload")
383 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
384 A_SetPitch(-0.1+pitch);
386 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
387 WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
388 WSPS A 1 Offset(0, 33)
389 WSPS A 0 A_SetPitch(0.05+pitch)
390 WSPS A 1 Offset(0, 34)
391 WSPS A 0 A_SetPitch(0.05+pitch)
392 WSPS A 0 A_JumpIfNoAmmo("Reload")
393 WSPS A 0 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON)
394 WSPS A 0 A_SetPitch(-0.1+pitch)
395 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
396 WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
397 WSPS A 1 Offset(0, 33)
398 WSPS A 0 A_SetPitch(0.05+pitch)
399 WSPS A 1 Offset(0, 34)
400 WSPS A 0 A_SetPitch(0.05+pitch)
404 WSPS A 4 A_SpawnItemEx("SteamPuffSpikeGun", 10, -1, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
405 WSPS A 4 A_SpawnItemEx("SteamPuffSpikeGun", 10, -1, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
419 WSPR A 0 A_JumpIfInventory("SpikeGunLoaded", 36, "ReloadFinish")
423 A_TakeInventory("SpikeGunZoomed", 1);
425 WSPR A 0 A_JumpIfInventory("SpikeMag", 1, "ReloadWork")
426 WSPR A 0 A_JumpIfNoAmmo("DryFire")
431 WSPI A 0 A_JumpIfInventory("SpikeGunHeat", 13, "ReloadWorkSteaming")
432 WSPI A 4 A_PlaySound("Weapons/SpikeGunReloadA", CHAN_WEAPON)
433 WSPI A 6 A_SpawnItem("SpikeMagDropped", -1, 16, 0)
438 WSPR D 3 A_PlaySound("Weapons/SpikeGunReloadB", CHAN_WEAPON)
446 WSPI A 4 A_PlaySound("Weapons/SpikeGunReloadA", CHAN_WEAPON)
447 WSPI A 3 A_SpawnItem("SpikeMagDropped", -1, 16, 0)
450 A_TakeInventory("SpikeGunHeat", 1);
451 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
456 A_TakeInventory("SpikeGunHeat", 1);
457 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
462 A_TakeInventory("SpikeGunHeat", 1);
463 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
468 A_TakeInventory("SpikeGunHeat", 1);
469 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
474 A_TakeInventory("SpikeGunHeat", 1);
475 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
480 A_TakeInventory("SpikeGunHeat", 1);
481 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
486 A_TakeInventory("SpikeGunHeat", 1);
487 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
492 A_TakeInventory("SpikeGunHeat", 1);
493 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
495 WSPR D 3 A_PlaySound("Weapons/SpikeGunReloadB", CHAN_WEAPON)
498 A_TakeInventory("SpikeGunHeat", 1);
499 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
504 A_TakeInventory("SpikeGunHeat", 1);
505 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
510 A_TakeInventory("SpikeGunHeat", 1);
511 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
516 A_TakeInventory("SpikeGunHeat", 1);
517 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
522 A_TakeInventory("SpikeGunHeat", 1);
523 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
530 // if reload in not cheating, drop unused ammo
531 if (!GetCVar("k8ZanMod_CheatReload")) {
532 A_TakeInventory("SpikeGunLoaded", 666);
534 local clipCount = CountInv("SpikeMag");
535 local loadCount = 36-CountInv("SpikeGunLoaded");
537 if (loadCount > clipCount) loadCount = clipCount;
538 A_TakeInventory("SpikeMag", loadCount);
539 A_GiveInventory("SpikeGunLoaded", loadCount);
541 user_lowPauseCount = 0;
549 WSPI A 16 A_PlaySound("Ammo/SpikeGunPick", CHAN_WEAPON, 0.2)
552 stateinclude "QuickKick/QuickKickInclude.txt"
557 ACTOR SpikeGunZoomed : Inventory {
558 Inventory.MaxAmount 1
562 ACTOR SpikeShot : FastProjectile {
570 Damage (3*random(6, 8))
571 DamageType "SpikeGun"
573 +k8MissileHitscan // block by "block hitscan" line flag, not by "block projectile" flag
580 SeeSound "Weapons/SpikeShotSee"
581 DeathSound "Weapons/SpikeShotDeath"
582 Obituary "%o got nailed by %k."
583 Decal "SpikeDecalHot"
587 PSPI Z 1 Bright //A_FaceMovementDirection(0, 0, 0)
597 ACTOR SpikeShotAimed : FastProjectile {
602 DamageType "SpikeGun"
605 +k8MissileHitscan // block by "block hitscan" line flag, not by "block projectile" flag
611 SeeSound "Weapons/SpikeShotSee"
612 DeathSound "Weapons/SpikeShotDeath"
613 Obituary "%o got surgically nailed by %k."
614 Decal "SpikeDecalHot"
629 ACTOR SpikeShotUnderwater /*: FastProjectile*/ {
637 Damage (3*random(6, 8))
638 DamageType "SpikeGun"
640 +k8MissileHitscan // block by "block hitscan" line flag, not by "block projectile" flag
648 //SeeSound "weapons/spikegunfire"
649 DeathSound "Weapons/SpikeShotDeath"
650 Obituary "%o got nailed by %k."
651 Decal "SpikeDecalHotUnderwater"
655 PSPI Z 1 Bright A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)//A_FaceMovementDirection(0, 0, 0)
659 TNT1 AAAA 0 A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
665 ACTOR SpikeShotAimedUnderwater /*: FastProjectile*/ {
669 Damage (3*random(7, 8))
670 DamageType "SpikeGun"
673 +k8MissileHitscan // block by "block hitscan" line flag, not by "block projectile" flag
680 DeathSound "Weapons/SpikeShotDeath"
681 Obituary "%o got surgically nailed by %k."
682 Decal "SpikeDecalHotUnderwater"
686 PSPI Z 1 Bright A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
690 TNT1 AAAA 0 A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
696 ACTOR SteamPuffSpikeGun {
701 RenderStyle "Translucent"
720 ACTOR SpikeGunHeat : Inventory {
722 Inventory.MaxAmount 36
723 Inventory.InterHubAmount 36
734 Actor (optional) Zan_GoldWandSpikeMag : SpikeMag Replaces GoldWandAmmo {}
735 Actor (optional) Zan_GoldWandSpikeMagBox : SpikeMagBox Replaces GoldWandHefty {}
737 Actor (optional) Zan_GoldWandSpikeGun : SpikeGun Replaces GoldWand {}
738 Actor (optional) Zan_GoldWandPoweredSpikeGun : SpikeGun Replaces GoldWandPowered {}
742 Actor (optional) Zan_Mana1SpikeMag : SpikeMag Replaces Mana1 {}
744 Actor (optional) Zan_TPH_TPHPistol : SpikeGun Replaces TPHPistol {}
745 Actor (optional) Zan_TPH_PistolAmmo : SpikeMag Replaces PistolAmmo {}