Jump to content

Help A_FireBullets!!


Panda

Recommended Posts

Whenever a weapon is fired, the first shot is always perfectly accurate, no matter how high the spread numbers are in "A_FireBullets". I have seen wads where this does not happen, but when I go to see how they have achieved it, I find myself with a tremendous code salad that I really do not understand. Is there a way to avoid it, and that from the first shot it spreads randomly?

 

I leave you the properties of my pistol.

 

Spoiler

Actor WPistol : Weapon  11028
{
  Scale 0.75
  Obituary "%o was splattered by %k pistol"
  Radius 20
  Height 16
  AttackSound "WPSTL10"
  Inventory.pickupmessage "You got the Pistol"
  Weapon.SelectionOrder 500
  Weapon.SlotNumber 2
  Weapon.kickback 100
  Weapon.ammotype "CLIP"
  Weapon.ammouse 1
  Weapon.ammogive 25
  States
  {
  Spawn:
    2PIS E -1
    Loop
  Ready:
    3PIS A 2 A_WeaponReady( WRF_NOBOB | WRF_NOSWITCH )
    Loop
  Deselect:
    3PIS A 1 A_Lower
    Loop
  Select:
    3PIS A 1 A_Raise
    Loop
  Fire:
    3PIS A 1
    3PIS B 1 bright A_FireBullets(3.5, 3.5, 1, 15, "BulletPuff", FBF_NORANDOM)
    3PIS CDE 2
    3PIS A 4 A_ReFire
    Goto Ready
  }
}

 

Edited by Panda

Share this post


Link to post

Try changing this line:

 

Quote

3PIS B 1 bright A_FireBullets(3.5, 3.5, 1, 15, "BulletPuff", FBF_NORANDOM)

 To this:

Quote

3PIS B 1 bright A_FireBullets(3.5, 3.5, -1, 15, "BulletPuff", FBF_NORANDOM)

 

Let me know if that works.

Share this post


Link to post
On 4/27/2023 at 4:33 PM, bofu said:

Try changing this line:

 

 To this:

 

Let me know if that works.

It was as simple as putting -1? xD thank you very much!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...