This is the fireing code for my AssultRifle for a project im hoping to complete soon
Fire:
ARFL A 0 A_PlayWeaponSound("Bullet/BulletA")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 1, 6, 1, 1)
ARFL A 3
ARFL A 0 A_PlayWeaponSound("Bullet/BulletA")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 1, 6, 1, 1)
ARFL A 3
Goto Ready
AltFire:
ARFL B 0 A_PlayWeaponSound("SMG/AltFire")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 7, 6, 1, 1)
ARFL A 12
Goto Ready
Now before I brought it over to GZDoom, I was using the latest Unofficial ZDoom build and I only had
ARFL A 0 A_PlayWeaponSound("Bullet/BulletA")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 1, 6, 1, 1)
ARFL A 3
Goto Ready
As the frames and such in the Fire State (As with ZDoom, it would just skip the Firestate and go to the Hold stat if you had A_ReFire and a Hold state to go to). And it worked well, the first shot was pinpoint and the rest as long as it was held down, were all random. The AltFire worked fine aswell. But when I moved it over to GZDoom, it made it so every bullet from the normal fire was pinpoint, so I added a second bullet and a Refire Hold setup. It worked fine for when I was using the primary fire, bu the Altfire just acted as the Primary fire. I looked to see if I messed up the keybindings, but they were as they should be. I have no idea what is going on with this, but after looking over my coding, I honestly couldnt see why it would replace the AltFire with the Primary fire.
It seemed to happen when I added the second bullet stuff to the primary Fire State, as it did it without a Hold state. So I would assume this is some form of Bug.
Decorate weapon problem
Moderator: Graf Zahl
- Zeg-Vok
- Posts: 233
- Joined: Wed Sep 21, 2005 18:04
- Location: Up the creek without a paddle
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Zeg-Vok
- Posts: 233
- Joined: Wed Sep 21, 2005 18:04
- Location: Up the creek without a paddle
- Contact:
One with no hold, but still replaces the AltFire
actor AssultRifle : weapon 10029
{
Obituary "%o was power owned by %k's Assult Rifle."
Scale 0.125
Inventory.Pickupmessage "You got the Assult Rifle."
Weapon.SelectionOrder 64
States
{
Spawn:
ARFL C 1
Loop
Ready:
ARFL A 1 A_WeaponReady
Loop
Select:
ARFL A 1 A_Raise
Loop
Deselect:
ARFL A 1 A_Lower
Loop
Fire:
ARFL A 0 A_PlayWeaponSound("Bullet/BulletA")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 1, 6, 1, 1)
ARFL A 3
ARFL A 0 A_PlayWeaponSound("Bullet/BulletA")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 1, 6, 1, 1)
ARFL A 3
Goto Ready
AltFire:
ARFL B 0 A_PlayWeaponSound("SMG/AltFire")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 7, 6, 1, 1)
ARFL A 12
Goto Ready
}
}
One with 1 bullet attack called in the fire state, and the AltFire works, but the primary fire is always pinpoint
actor AssultRifle : weapon 10029
{
Obituary "%o was power owned by %k's Assult Rifle."
Scale 0.125
Inventory.Pickupmessage "You got the Assult Rifle."
Weapon.SelectionOrder 64
States
{
Spawn:
ARFL C 1
Loop
Ready:
ARFL A 1 A_WeaponReady
Loop
Select:
ARFL A 1 A_Raise
Loop
Deselect:
ARFL A 1 A_Lower
Loop
Fire:
ARFL A 0 A_PlayWeaponSound("Bullet/BulletA")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 1, 6, 1, 1)
ARFL A 3
Goto Ready
AltFire:
ARFL B 0 A_PlayWeaponSound("SMG/AltFire")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 7, 6, 1, 1)
ARFL A 12
Goto Ready
}
}
actor AssultRifle : weapon 10029
{
Obituary "%o was power owned by %k's Assult Rifle."
Scale 0.125
Inventory.Pickupmessage "You got the Assult Rifle."
Weapon.SelectionOrder 64
States
{
Spawn:
ARFL C 1
Loop
Ready:
ARFL A 1 A_WeaponReady
Loop
Select:
ARFL A 1 A_Raise
Loop
Deselect:
ARFL A 1 A_Lower
Loop
Fire:
ARFL A 0 A_PlayWeaponSound("Bullet/BulletA")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 1, 6, 1, 1)
ARFL A 3
ARFL A 0 A_PlayWeaponSound("Bullet/BulletA")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 1, 6, 1, 1)
ARFL A 3
Goto Ready
AltFire:
ARFL B 0 A_PlayWeaponSound("SMG/AltFire")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 7, 6, 1, 1)
ARFL A 12
Goto Ready
}
}
One with 1 bullet attack called in the fire state, and the AltFire works, but the primary fire is always pinpoint
actor AssultRifle : weapon 10029
{
Obituary "%o was power owned by %k's Assult Rifle."
Scale 0.125
Inventory.Pickupmessage "You got the Assult Rifle."
Weapon.SelectionOrder 64
States
{
Spawn:
ARFL C 1
Loop
Ready:
ARFL A 1 A_WeaponReady
Loop
Select:
ARFL A 1 A_Raise
Loop
Deselect:
ARFL A 1 A_Lower
Loop
Fire:
ARFL A 0 A_PlayWeaponSound("Bullet/BulletA")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 1, 6, 1, 1)
ARFL A 3
Goto Ready
AltFire:
ARFL B 0 A_PlayWeaponSound("SMG/AltFire")
ARFL B 2 BRIGHT A_FireBullets(4, 4, 7, 6, 1, 1)
ARFL A 12
Goto Ready
}
}
- TheDarkArchon
- Posts: 1000
- Joined: Wed Jul 06, 2005 11:58
- Location: What's that fucking smell
- Contact:
Code: Select all
ARFL B 2 BRIGHT A_FireBullets(4, 4, 1, 6, 1, 1)
Code: Select all
ARFL B 2 BRIGHT A_FireBullets(4, 4, -1, 6, 1, 1)
- Zeg-Vok
- Posts: 233
- Joined: Wed Sep 21, 2005 18:04
- Location: Up the creek without a paddle
- Contact:
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
- Zeg-Vok
- Posts: 233
- Joined: Wed Sep 21, 2005 18:04
- Location: Up the creek without a paddle
- Contact: