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)
188 TNT1 A 0 A_JumpIf(CountInv("SpikeGunHeat") > 28, "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)
201 WSPS A 1 Offset(10000, 32) A_WeaponReady(WRF_ALLOWRELOAD)
202 TNT1 A 0 A_JumpIf(CountInv("SpikeGunHeat") > 28, "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)
215 WSPI A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "UnZoom")
216 WSPI A 8 { if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(1); }
217 WSPI A 1 Offset(10000, 36)
218 WSPI A 1 Offset(10000, 42)
219 WSPI A 1 Offset(10000, 48)
220 TNT1 A 0 A_ZoomFactor(2)
221 WSPS A 1 Offset(10000, 48)
222 WSPS A 1 Offset(10000, 40)
223 WSPS A 1 Offset(10000, 35)
224 WSPS A 1 Offset(10000, 32)
225 TNT1 A 0 A_GiveInventory("SpikeGunZoomed", 1)
229 WSPS A 4 A_TakeInventory("SpikeGunZoomed", 1)
230 WSPS A 1 Offset(10000, 32)
231 WSPS A 1 Offset(10000, 35)
232 WSPS A 1 Offset(10000, 40)
233 WSPS A 1 Offset(10000, 48)
234 TNT1 A 0 A_ZoomFactor(1)
235 WSPI A 1 Offset(-15, 48)
236 WSPI A 1 Offset(-15, 42)
237 WSPI A 1 Offset(-15, 36)
241 TNT1 A 0 A_JumpIfNoAmmo("Reload")
242 TNT1 A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "FireZoomed")
243 TNT1 A 0 A_JumpIf(waterlevel==3, "WaterFire")
246 user_lowPauseCount = -666;
248 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
249 A_SetPitch(-0.50+pitch);
251 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
252 WSPF A 1 A_FireProjectile("SpikeShot", frandom(-0.5, 0.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(-0.5, 0.5))
256 A_GiveInventory("SpikeGunHeat", 1);
257 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
258 A_SetPitch(-0.30+pitch);
260 //WSPI A 1 A_FireBullets(1, 1, 0, 3*random(2, 3), "HammerPuff", FPF_NOAUTOAIM)
261 WSPF B 2 Offset(0, 33)
262 WSPF B 0 A_SetPitch(0.40+pitch)
263 WSPF C 2 Offset(0, 34) //A_ReFire
266 A_SetPitch(0.40+pitch);
272 TNT1 A 0 A_JumpIfNoAmmo("Reload")
273 TNT1 A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "FireZoomed")
276 user_lowPauseCount = -666;
277 A_GunFlash("Flash"); //k8: i restored underwater flash
278 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
279 A_SetPitch(-0.2+pitch);
281 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
282 WSPF A 1 A_FireProjectile("SpikeShotUnderwater", frandom(-0.7, 0.7), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(-0.7, 0.7))
284 TNT1 A 0 A_SetPitch(0.1+pitch)
285 //WSPI A 1 A_FireBullets(1, 1, 0, 3*random(2, 3), "HammerPuff", FPF_NOAUTOAIM)
286 WSPF B 2 Offset(0, 33)
287 WSPF C 2 Offset(0, 34) //A_ReFire
288 TNT1 A 0 A_SetPitch(0.1+pitch)
289 TNT1 A 0 //A_AlertMonsters
293 TNT1 A 0 A_JumpIfNoAmmo("Reload")
294 TNT1 A 0 A_JumpIf(waterlevel==3, "WaterFireZoomed")
297 user_lowPauseCount = -666;
298 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
299 A_SetPitch(-0.20+pitch);
301 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
302 WSPS A 1 A_FireProjectile("SpikeShotAimed", frandom(-0.1, 0.1), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.2, 0.2))
305 A_GiveInventory("SpikeGunHeat", 1);
306 A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
308 WSPS A 1 Offset(0, 33)
309 WSPS A 0 A_SetPitch(0.10+pitch)
310 WSPS A 1 Offset(0, 34)
313 A_SetPitch(0.10+pitch);
316 WSPS A 0 A_JumpIfNoAmmo("Reload")
317 WSPS A 0 A_JumpIf(waterlevel==3, "WaterFireZoomed")
318 WSPS A 0 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON)
319 WSPS A 0 A_SetPitch(-0.20+pitch)
320 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
321 WSPS A 1 A_FireProjectile("SpikeShotAimed", frandom(-0.1, 0.1), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.2, 0.2))
324 A_GiveInventory("SpikeGunHeat", 1);
325 A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
327 WSPS A 1 Offset(0, 33)
328 WSPS A 0 A_SetPitch(0.10+pitch)
329 WSPS A 1 Offset(0, 34)
332 A_SetPitch(0.10+pitch);
335 WSPS A 0 A_JumpIfNoAmmo("Reload")
336 WSPS A 0 A_JumpIf(waterlevel==3, "WaterFireZoomed")
339 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
340 A_SetPitch(-0.20+pitch);
342 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
343 WSPS A 1 A_FireProjectile("SpikeShotAimed", frandom(-0.1, 0.1), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.2, 0.2))
346 A_GiveInventory("SpikeGunHeat", 1);
347 A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
349 WSPS A 1 Offset(0, 33)
350 WSPS A 0 A_SetPitch(0.10+pitch)
351 WSPS A 1 Offset(0, 34)
354 A_SetPitch(0.10+pitch);
360 TNT1 A 0 A_JumpIfNoAmmo("Reload")
363 user_lowPauseCount = -666;
364 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
365 A_SetPitch(-0.1+pitch);
367 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
368 WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
369 WSPS A 1 Offset(0, 33)
370 WSPS A 0 A_SetPitch(0.05+pitch)
371 WSPS A 1 Offset(0, 34)
372 WSPS A 0 A_SetPitch(0.05+pitch)
373 WSPS A 0 A_JumpIfNoAmmo("Reload")
376 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
377 A_SetPitch(-0.1+pitch);
379 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
380 WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
381 WSPS A 1 Offset(0, 33)
382 WSPS A 0 A_SetPitch(0.05+pitch)
383 WSPS A 1 Offset(0, 34)
384 WSPS A 0 A_SetPitch(0.05+pitch)
385 WSPS A 0 A_JumpIfNoAmmo("Reload")
386 WSPS A 0 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON)
387 WSPS A 0 A_SetPitch(-0.1+pitch)
388 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
389 WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
390 WSPS A 1 Offset(0, 33)
391 WSPS A 0 A_SetPitch(0.05+pitch)
392 WSPS A 1 Offset(0, 34)
393 WSPS A 0 A_SetPitch(0.05+pitch)
397 WSPS A 4 A_SpawnItemEx("SteamPuffSpikeGun", 10, -1, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
398 WSPS A 4 A_SpawnItemEx("SteamPuffSpikeGun", 10, -1, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
412 WSPR A 0 A_JumpIfInventory("SpikeGunLoaded", 36, "ReloadFinish")
416 A_TakeInventory("SpikeGunZoomed", 1);
418 WSPR A 0 A_JumpIfInventory("SpikeMag", 1, "ReloadWork")
419 WSPR A 0 A_JumpIfNoAmmo("DryFire")
424 WSPI A 0 A_JumpIf(CountInv("SpikeGunHeat") > 12, "ReloadWorkSteaming")
425 WSPI A 4 A_PlaySound("Weapons/SpikeGunReloadA", CHAN_WEAPON)
426 WSPI A 6 A_SpawnItem("SpikeMagDropped", -1, 16, 0)
431 WSPR D 3 A_PlaySound("Weapons/SpikeGunReloadB", CHAN_WEAPON)
439 WSPI A 4 A_PlaySound("Weapons/SpikeGunReloadA", CHAN_WEAPON)
440 WSPI A 3 A_SpawnItem("SpikeMagDropped", -1, 16, 0)
443 A_TakeInventory("SpikeGunHeat", 1);
444 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
449 A_TakeInventory("SpikeGunHeat", 1);
450 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
455 A_TakeInventory("SpikeGunHeat", 1);
456 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
461 A_TakeInventory("SpikeGunHeat", 1);
462 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
467 A_TakeInventory("SpikeGunHeat", 1);
468 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
473 A_TakeInventory("SpikeGunHeat", 1);
474 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
479 A_TakeInventory("SpikeGunHeat", 1);
480 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
485 A_TakeInventory("SpikeGunHeat", 1);
486 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
488 WSPR D 3 A_PlaySound("Weapons/SpikeGunReloadB", CHAN_WEAPON)
491 A_TakeInventory("SpikeGunHeat", 1);
492 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
497 A_TakeInventory("SpikeGunHeat", 1);
498 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
503 A_TakeInventory("SpikeGunHeat", 1);
504 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
509 A_TakeInventory("SpikeGunHeat", 1);
510 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
515 A_TakeInventory("SpikeGunHeat", 1);
516 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
523 // if reload in not cheating, drop unused ammo
524 if (!GetCVar("k8ZanMod_CheatReload")) {
525 A_TakeInventory("SpikeGunLoaded", 666);
527 local clipCount = CountInv("SpikeMag");
528 local loadCount = 36-CountInv("SpikeGunLoaded");
530 if (loadCount > clipCount) loadCount = clipCount;
531 A_TakeInventory("SpikeMag", loadCount);
532 A_GiveInventory("SpikeGunLoaded", loadCount);
534 user_lowPauseCount = 0;
542 WSPI A 16 A_PlaySound("Ammo/SpikeGunPick", CHAN_WEAPON, 0.2)
545 stateinclude "QuickKick/QuickKickInclude.txt"
550 ACTOR SpikeGunZoomed : Inventory {
551 Inventory.MaxAmount 1
555 ACTOR SpikeShot : FastProjectile {
563 Damage (3*random(6, 8))
564 DamageType "SpikeGun"
572 SeeSound "Weapons/SpikeShotSee"
573 DeathSound "Weapons/SpikeShotDeath"
574 Obituary "%o got nailed by %k."
575 Decal "SpikeDecalHot"
579 PSPI Z 1 Bright //A_FaceMovementDirection(0, 0, 0)
589 ACTOR SpikeShotAimed : FastProjectile {
593 Damage (3*random(9, 9))
594 DamageType "SpikeGun"
602 SeeSound "Weapons/SpikeShotSee"
603 DeathSound "Weapons/SpikeShotDeath"
604 Obituary "%o got surgically nailed by %k."
605 Decal "SpikeDecalHot"
620 ACTOR SpikeShotUnderwater /*: FastProjectile*/ {
628 Damage (3*random(6, 8))
629 DamageType "SpikeGun"
638 //SeeSound "weapons/spikegunfire"
639 DeathSound "Weapons/SpikeShotDeath"
640 Obituary "%o got nailed by %k."
641 Decal "SpikeDecalHotUnderwater"
645 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)
649 TNT1 AAAA 0 A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
655 ACTOR SpikeShotAimedUnderwater /*: FastProjectile*/ {
659 Damage (3*random(7, 8))
660 DamageType "SpikeGun"
669 DeathSound "Weapons/SpikeShotDeath"
670 Obituary "%o got surgically nailed by %k."
671 Decal "SpikeDecalHotUnderwater"
675 PSPI Z 1 Bright A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
679 TNT1 AAAA 0 A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
685 ACTOR SteamPuffSpikeGun {
690 RenderStyle "Translucent"
709 ACTOR SpikeGunHeat : Inventory {
711 Inventory.MaxAmount 36
712 Inventory.InterHubAmount 36
723 Actor (optional) Zan_GoldWandSpikeMag : SpikeMag Replaces GoldWandAmmo {}
724 Actor (optional) Zan_GoldWandSpikeMagBox : SpikeMagBox Replaces GoldWandHefty {}
726 Actor (optional) Zan_GoldWandSpikeGun : SpikeGun Replaces GoldWand {}
727 Actor (optional) Zan_GoldWandPoweredSpikeGun : SpikeGun Replaces GoldWandPowered {}
731 Actor (optional) Zan_Mana1SpikeMag : SpikeMag Replaces Mana1 {}
733 Actor (optional) Zan_TPH_TPHPistol : SpikeGun Replaces TPHPistol {}
734 Actor (optional) Zan_TPH_PistolAmmo : SpikeMag Replaces PistolAmmo {}