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;
118 var int user_LoadCount;
119 var int user_ClipCount;
127 // always has some loaded ammo on first pickup
128 TNT1 A 0 A_GiveInventory("SpikeGunLoaded", random(1, 3)*10)
132 stateinclude "decorate/Weapons/QuickKick/QuickKickOnSelectDeselect.txt"
135 A_GiveInventory("HoldingSpikeGun", 1);
136 if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(3);
138 WSPI A 0 A_Raise(666)
142 stateinclude "decorate/Weapons/QuickKick/QuickKickOnSelectDeselect.txt"
145 A_TakeInventory("SpikeGunZoomed", 1);
147 A_TakeInventory("SpikeGunHeat", 36);
149 WSPI A 1 Offset(-15, 40)
150 WSPI A 1 Offset(-30, 50)
151 WSPI A 1 Offset(-50, 65)
152 WSPI A 1 Offset(-70, 80)
156 TNT1 A 0 A_TakeInventory("HoldingSpikeGun", 1)
157 TNT1 A 1 A_Lower(666) // was zero duration
162 TNT1 A 0 A_PlaySound("Ammo/SpikeGunPick", CHAN_WEAPON, 0.6)
163 WSPI A 1 Offset(-70, 80)
164 WSPI A 1 Offset(-50, 65)
165 WSPI A 1 Offset(-30, 50)
166 WSPI A 1 Offset(-15, 40)
167 TNT1 A 0 A_TakeInventory("QuickKickDisabled")
174 if (CountInv("SpikeGunLoaded") <= 8) {
175 user_lowPauseCount -= 1;
176 if (user_lowPauseCount < 1) {
177 if (GetCVarB("k8ZanMod_WarnLowAmmo")) {
178 A_PlaySound("weapons/zanweapon/lowammo", CHAN_VOICE, 1.0);
180 user_lowPauseCount = CountInv("SpikeGunLoaded");
181 if (user_lowPauseCount > 6) user_lowPauseCount = 40;
182 else if (user_lowPauseCount > 4) user_lowPauseCount = 30;
183 else if (user_lowPauseCount > 0) user_lowPauseCount = 20;
184 else user_lowPauseCount = 10;
188 WSPI A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "ReadyZoomed")
189 TNT1 A 0 Offset(-15, 40) { if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(3); }
190 WSPI A 1 A_WeaponReady(WRF_ALLOWRELOAD)
191 TNT1 A 0 A_JumpIf(CountInv("SpikeGunHeat") > 28, "Steaming")
197 A_TakeInventory("SpikeGunHeat", 1);
198 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 150);
200 WSPI A 4 A_WeaponReady(WRF_ALLOWRELOAD)
204 WSPS A 1 Offset(10000, 32) A_WeaponReady(WRF_ALLOWRELOAD)
205 TNT1 A 0 A_JumpIf(CountInv("SpikeGunHeat") > 28, "ZoomSteaming")
211 A_TakeInventory("SpikeGunHeat", 1);
212 A_SpawnItemEx("SteamPuffSpikeGun", 10, 0, 62, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 150);
214 WSPS A 4 A_WeaponReady(WRF_ALLOWRELOAD)
218 WSPI A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "UnZoom")
219 WSPI A 8 { if (GetCVarB('k8ZanMod_CustomCrosshairs')) A_SetCrosshair(1); }
220 WSPI A 1 Offset(10000, 36)
221 WSPI A 1 Offset(10000, 42)
222 WSPI A 1 Offset(10000, 48)
223 TNT1 A 0 A_ZoomFactor(2)
224 WSPS A 1 Offset(10000, 48)
225 WSPS A 1 Offset(10000, 40)
226 WSPS A 1 Offset(10000, 35)
227 WSPS A 1 Offset(10000, 32)
228 TNT1 A 0 A_GiveInventory("SpikeGunZoomed", 1)
232 WSPS A 4 A_TakeInventory("SpikeGunZoomed", 1)
233 WSPS A 1 Offset(10000, 32)
234 WSPS A 1 Offset(10000, 35)
235 WSPS A 1 Offset(10000, 40)
236 WSPS A 1 Offset(10000, 48)
237 TNT1 A 0 A_ZoomFactor(1)
238 WSPI A 1 Offset(-15, 48)
239 WSPI A 1 Offset(-15, 42)
240 WSPI A 1 Offset(-15, 36)
244 TNT1 A 0 A_JumpIfNoAmmo("Reload")
245 TNT1 A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "FireZoomed")
246 TNT1 A 0 A_JumpIf(waterlevel==3, "WaterFire")
250 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
251 A_SetPitch(-0.50+pitch);
253 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
254 WSPF A 1 A_FireProjectile("SpikeShot", frandom(-0.5, 0.5), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(-0.5, 0.5))
258 A_GiveInventory("SpikeGunHeat", 1);
259 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0);
260 A_SetPitch(-0.30+pitch);
262 //WSPI A 1 A_FireBullets(1, 1, 0, 3*random(2, 3), "HammerPuff", FPF_NOAUTOAIM)
263 WSPF B 2 Offset(0, 33)
264 WSPF B 0 A_SetPitch(0.40+pitch)
265 WSPF C 2 Offset(0, 34) //A_ReFire
268 A_SetPitch(0.40+pitch);
274 TNT1 A 0 A_JumpIfNoAmmo("Reload")
275 TNT1 A 0 A_JumpIfInventory("SpikeGunZoomed", 1, "FireZoomed")
278 A_GunFlash("Flash"); //k8: i restored underwater flash
279 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
280 A_SetPitch(-0.2+pitch);
282 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
283 WSPF A 1 A_FireProjectile("SpikeShotUnderwater", frandom(-0.7, 0.7), 1, /*3*/0, 0, FPF_NOAUTOAIM, frandom(-0.7, 0.7))
285 TNT1 A 0 A_SetPitch(0.1+pitch)
286 //WSPI A 1 A_FireBullets(1, 1, 0, 3*random(2, 3), "HammerPuff", FPF_NOAUTOAIM)
287 WSPF B 2 Offset(0, 33)
288 WSPF C 2 Offset(0, 34) //A_ReFire
289 TNT1 A 0 A_SetPitch(0.1+pitch)
290 TNT1 A 0 //A_AlertMonsters
294 TNT1 A 0 A_JumpIfNoAmmo("Reload")
295 TNT1 A 0 A_JumpIf(waterlevel==3, "WaterFireZoomed")
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 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
364 A_SetPitch(-0.1+pitch);
366 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
367 WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
368 WSPS A 1 Offset(0, 33)
369 WSPS A 0 A_SetPitch(0.05+pitch)
370 WSPS A 1 Offset(0, 34)
371 WSPS A 0 A_SetPitch(0.05+pitch)
372 WSPS A 0 A_JumpIfNoAmmo("Reload")
375 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON);
376 A_SetPitch(-0.1+pitch);
378 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
379 WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
380 WSPS A 1 Offset(0, 33)
381 WSPS A 0 A_SetPitch(0.05+pitch)
382 WSPS A 1 Offset(0, 34)
383 WSPS A 0 A_SetPitch(0.05+pitch)
384 WSPS A 0 A_JumpIfNoAmmo("Reload")
385 WSPS A 0 A_PlaySound("Weapons/SpikeGunFire", CHAN_WEAPON)
386 WSPS A 0 A_SetPitch(-0.1+pitch)
387 //k8: do not horizontally ofsset spike shots, i want them to go through the crosshair
388 WSPS A 1 A_FireProjectile("SpikeShotAimedUnderwater", frandom(-0.3, 0.3), 1, /*1*/0, 0, FPF_NOAUTOAIM, frandom(-0.4, 0.4))
389 WSPS A 1 Offset(0, 33)
390 WSPS A 0 A_SetPitch(0.05+pitch)
391 WSPS A 1 Offset(0, 34)
392 WSPS A 0 A_SetPitch(0.05+pitch)
396 WSPS A 4 A_SpawnItemEx("SteamPuffSpikeGun", 10, -1, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
397 WSPS A 4 A_SpawnItemEx("SteamPuffSpikeGun", 10, -1, 62, 1, 0, 0, 0, SXF_NOCHECKPOSITION, 0)
411 WSPR A 0 A_JumpIfInventory("SpikeGunLoaded", 36, "ReloadFinish")
415 A_TakeInventory("SpikeGunZoomed", 1);
417 WSPR A 0 A_JumpIfInventory("SpikeMag", 1, "ReloadWork")
418 WSPR A 0 A_JumpIfNoAmmo("DryFire")
423 WSPI A 0 A_JumpIf(CountInv("SpikeGunHeat") > 12, "ReloadWorkSteaming")
424 WSPI A 4 A_PlaySound("Weapons/SpikeGunReloadA", CHAN_WEAPON)
425 WSPI A 6 A_SpawnItem("SpikeMagDropped", -1, 16, 0)
430 WSPR D 3 A_PlaySound("Weapons/SpikeGunReloadB", CHAN_WEAPON)
438 WSPI A 4 A_PlaySound("Weapons/SpikeGunReloadA", CHAN_WEAPON)
439 WSPI A 3 A_SpawnItem("SpikeMagDropped", -1, 16, 0)
442 A_TakeInventory("SpikeGunHeat", 1);
443 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
448 A_TakeInventory("SpikeGunHeat", 1);
449 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 60, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
454 A_TakeInventory("SpikeGunHeat", 1);
455 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
460 A_TakeInventory("SpikeGunHeat", 1);
461 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
466 A_TakeInventory("SpikeGunHeat", 1);
467 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
472 A_TakeInventory("SpikeGunHeat", 1);
473 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
478 A_TakeInventory("SpikeGunHeat", 1);
479 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
484 A_TakeInventory("SpikeGunHeat", 1);
485 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
487 WSPR D 3 A_PlaySound("Weapons/SpikeGunReloadB", CHAN_WEAPON)
490 A_TakeInventory("SpikeGunHeat", 1);
491 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 66, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
496 A_TakeInventory("SpikeGunHeat", 1);
497 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
502 A_TakeInventory("SpikeGunHeat", 1);
503 A_SpawnItemEx("SteamPuffSpikeGun", 10, 5, 67, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
508 A_TakeInventory("SpikeGunHeat", 1);
509 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
514 A_TakeInventory("SpikeGunHeat", 1);
515 A_SpawnItemEx("SteamPuffSpikeGun", 10, 2, 63, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 80);
522 // if reload in not cheating, drop unused ammo
523 if (!GetCVar("k8ZanMod_CheatReload")) {
524 A_TakeInventory("SpikeGunLoaded", 666);
526 user_ClipCount = CountInv("SpikeMag");
527 user_LoadCount = 36-CountInv("SpikeGunLoaded");
528 if (user_LoadCount > 0) {
529 if (user_LoadCount > user_ClipCount) user_LoadCount = user_ClipCount;
530 A_TakeInventory("SpikeMag", user_LoadCount);
531 A_GiveInventory("SpikeGunLoaded", user_LoadCount);
533 user_lowPauseCount = 0;
541 WSPI A 16 A_PlaySound("Ammo/SpikeGunPick", CHAN_WEAPON, 0.2)
544 stateinclude "decorate/Weapons/QuickKick/QuickKickInclude.txt"
549 ACTOR SpikeGunZoomed : Inventory {
550 Inventory.MaxAmount 1
554 ACTOR SpikeShot : FastProjectile {
562 Damage (3*random(6, 8))
563 DamageType "SpikeGun"
571 SeeSound "Weapons/SpikeShotSee"
572 DeathSound "Weapons/SpikeShotDeath"
573 Obituary "%o got nailed by %k."
574 Decal "SpikeDecalHot"
578 PSPI Z 1 //A_FaceMovementDirection(0, 0, 0)
588 ACTOR SpikeShotAimed : FastProjectile {
592 Damage (3*random(9, 9))
593 DamageType "SpikeGun"
601 SeeSound "Weapons/SpikeShotSee"
602 DeathSound "Weapons/SpikeShotDeath"
603 Obituary "%o got surgically nailed by %k."
604 Decal "SpikeDecalHot"
619 ACTOR SpikeShotUnderwater /*: FastProjectile*/ {
627 Damage (3*random(6, 8))
628 DamageType "SpikeGun"
637 //SeeSound "weapons/spikegunfire"
638 DeathSound "Weapons/SpikeShotDeath"
639 Obituary "%o got nailed by %k."
640 Decal "SpikeDecalHotUnderwater"
644 PSPI Z 1 A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)//A_FaceMovementDirection(0, 0, 0)
648 TNT1 AAAA 0 A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
654 ACTOR SpikeShotAimedUnderwater /*: FastProjectile*/ {
658 Damage (3*random(7, 8))
659 DamageType "SpikeGun"
668 DeathSound "Weapons/SpikeShotDeath"
669 Obituary "%o got surgically nailed by %k."
670 Decal "SpikeDecalHotUnderwater"
674 PSPI Z 1 A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
678 TNT1 AAAA 0 A_SpawnItemEx("UnderwaterBubble", 0, 0, 0, random(-1, 1), random(-1, 1), random(1, 2), 0, SXF_NOCHECKPOSITION, 80)
684 ACTOR SteamPuffSpikeGun {
689 RenderStyle "Translucent"
708 ACTOR SpikeGunHeat : Inventory {
710 Inventory.MaxAmount 36
711 Inventory.InterHubAmount 36
722 Actor (optional) Zan_GoldWandSpikeMag : SpikeMag Replaces GoldWandAmmo {}
723 Actor (optional) Zan_GoldWandSpikeMagBox : SpikeMagBox Replaces GoldWandHefty {}
725 Actor (optional) Zan_GoldWandSpikeGun : SpikeGun Replaces GoldWand {}
726 Actor (optional) Zan_GoldWandPoweredSpikeGun : SpikeGun Replaces GoldWandPowered {}
730 Actor (optional) Zan_Mana1SpikeMag : SpikeMag Replaces Mana1 {}
732 Actor (optional) Zan_TPH_TPHPistol : SpikeGun Replaces TPHPistol {}
733 Actor (optional) Zan_TPH_PistolAmmo : SpikeMag Replaces PistolAmmo {}