Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Tamashii

Decorate weapon script help

Recommended Posts

Hi. I've been playing around with XWE and weapon mods. I don't plan on stealing ppl's work and claiming them as my own. I do like to play around to my heart's content however. I've been trying to merge "ww-diaz" assault shotgun into "wwhc-diaz" to replace the minishotgun.

So far, a direct copy/paste works, but when I want to add recoil with the line :

ASHF A 0 ACS_Execute(287,0,90,random(2,4),0)

the assault shotgun stops reloading. i can't figure it out. would anyone be able to tell me what i'm doing wrong, and if possible, point out a quick solution? Thanks. Code as follows:

ACTOR AShotgun : Weapon replaces Shotgun
{
//$Category weapons
Inventory.PickupMessage "Assault Shotgun (3)"
Inventory.PickupSound "shotgun/cock"
Weapon.AmmoType "ShotgunClip"
Weapon.AmmoGive 0
Weapon.AmmoUse 1
Weapon.AmmoType2 "ExtraShotgunAmmo"
Weapon.AmmoGive2 8
Weapon.AmmoUse2 0
Radius 12
Height 12
scale 0.5
+AMMO_OPTIONAL
+NOEXTREMEDEATH
+NOAUTOFIRE
States
{
Spawn:
ASHP A 1
LOOP
Select:
ASHG A 1 A_Raise
Loop
Deselect:
ASHG A 1 A_Lower
Loop
Ready:
ASHG A 1 A_WeaponReady
ASHG A 0 A_JumpIfInventory("MiniShotgunReloading",1,13)
Loop
Fire:
ASHG A 0 A_JumpIfNoAmmo("DryFire")
ASHF A 0 BRIGHT A_GunFlash
ASHF A 0 A_PlayWeaponSound("shotgun/fire")
ASHF A 0 ACS_Execute(287,0,90,random(2,4),0)
ASHF A 2 BRIGHT A_FireBullets(6,4,12,4,"ShotPuff",1)
ASHG B 1 A_FireCustomMissile("ShotSmokeSpawner",0,0,3,8)
ASHG C 1
ASHG A 7
ASHG D 2 A_PlaySound("shotgun/cock")
ASHG E 3 A_FireCustomMissile("ShellCasingSpawner",-3,0,0,0)
ASHG D 2
ASHG A 8
Goto Ready
ASHG A 1 A_PlayWeaponSound("shotgun/noammo")
Goto Ready
Reload:
TNT1 A 0 A_JumpIfInventory("ShotgunClip",8,2)
TNT1 A 0 A_JumpIfInventory("ExtraShotgunAmmo",1,2)
TNT1 A 0
Goto Ready
ASHT A 2
ASHT BCD 2
ASHR A 1
ASHR BC 1
ASHR D 1 A_PlaySound("shotgun/fill")
ASHR EFG 2
TNT1 A 0 A_TakeInventory("ExtraShotgunAmmo",1)
TNT1 A 0 A_GiveInventory("ShotgunClip",1)
ASHR AAAA 1 A_WeaponReady
TNT1 A 0 A_JumpIfInventory("ExtraShotgunAmmo",1,1)
Goto Fire+35
ASHR A 0 A_JumpIfInventory("ShotgunClip",8,5)
TNT1 A 0
Goto Fire+19
ASHR A 7
ASHT DCBA 2
ASHG D 2 A_PlaySound("shotgun/cock")
ASHG E 3
ASHG D 2
ASHG A 8
Goto Ready

AltFire:
ASHR A 2
ASHM A 2 A_PlayWeaponSound("melee/swing")
ASHM B 1
ASHM C 1 A_CustomPunch(7,0,0,"HitPuff")
ASHM DE 1
ASHM FGHI 2
Goto Ready
Flash:
TNT1 A 0
TNT1 A 2 A_Light2
TNT1 A 2 A_Light1
TNT1 A 1 A_Light0
Stop
}
}

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×