[Done] A_FireInnacurate

Moderator: GZDoom Developers

A_FireInnacurate

Postby DoomRater » Sun Jun 12, 2005 5:26 pm

I know that A_refire causes the weapons to become innacurate while firing, but there's something I simply cannot perform without a seperate option for it.
Code: Select allExpand view
MGUN B 2 A_FireBullets(2,2,1,5,0)
MGUN B 0 A_CheckReload
MGUN B 0 A_FireInnaccurate
MGUN C 2 A_FireBullets(2,2,1,5,0)
MGUN C 0 A_CheckReload
MGUN D 2 A_FireBullets(2,2,1,5,0)
MGUN D 0 A_Refire
Goto Ready
User avatar
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308

Postby Graf Zahl » Sun Jun 12, 2005 6:23 pm

Changed it so that passing -1 as the amount of bullets shoots one inaccurate bullet. You may have to wait for it a few days though. First I have to integrate all the small stuff I did into Grubber's inofficial build.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby DoomRater » Sun Jun 12, 2005 6:50 pm

Ooo. That's a nice fix. It sure beats adding a new codepointer and then having to go around messing with existing pointers.
User avatar
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308

Postby Anakin S. » Sun Jun 12, 2005 8:09 pm

How about this?

Code: Select allExpand view
      Fire:
      CHGG A 0 A_ReFire
      Goto Ready
   Hold:
      CHGG A 0 A_GunFlash
            CHGG A 4 A_FireBullets(6, 0, 1, 5, "BulletPuff")
            CHGG B 4 A_FireBullets(6, 0, 1, 5, "BulletPuff")
            CHGG A 0 A_ReFire
      Goto Ready
User avatar
Anakin S.
Am I evil?
 
Joined: 28 Nov 2003
Location: A long time ago in a galaxy far, far away...

Postby DoomRater » Sun Jun 12, 2005 8:35 pm

That code would fire a two round burst that is always innaccurate, when I want a three round burst where the first shot is accurate but NONE of the others. I've thought about how it would work and I still haven't thought of code that would do it, even with inventory items being used to check for innaccuracy.

EDIT: Here's what the three round burst would do using Graf's suggestion:
Code: Select allExpand view
MGUN B 2 A_FireBullets(2,2,1,5,0)
MGUN B 0 A_CheckReload
MGUN C 2 A_FireBullets(2,2,-1,5,0)
MGUN C 0 A_CheckReload
MGUN D 2 A_FireBullets(2,2,-1,5,0)
MGUN D 0 A_Refire
Goto Ready
User avatar
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308

Postby Xaser » Sun Jun 12, 2005 10:43 pm

This is a really good request and stuff, but another thing I'd really like: Projectile inaccuracy.

I mean, a plasma gun shooting faster than a darn chaingun probably wouldn't spit out bullets in a perfectly straight line the whole time, would it? :P
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Postby DoomRater » Sun Jun 12, 2005 10:45 pm

Xaser, you took the words out of my mouth. Currently making an projectile innaccurate requires a bunch of random jumps (with the proper jump calculation fractions) and a mile long decorate weapon, and it would just be easier to have the feature there.
User avatar
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308

Postby TheDarkArchon » Mon Jun 13, 2005 10:31 am

You mean something liek this?

Code: Select allExpand view
ACTOR PhotonRifle : Weapon 20994
{
   Inventory.PickupMessage "You got the C022UP7 Photon Rifle!"
   Inventory.PickupSound "misc/w_pkup"
   Weapon.SelectionOrder 100
   Weapon.Kickback 1
   Weapon.AmmoType1 "Clip"
   Weapon.AmmoType2 "PhotonRifleHeat"
   Weapon.AmmoGive 25
   Weapon.AmmoUse 1
   States
   {
      Spawn:
        PHRI A -1
        LOOP
      Ready:
     PRFG A 1 A_WeaponReady
     PRFG A 0 A_TakeInventory("PhotonRifleHeat",1)
        Loop
      Deselect:
     PRFG A 0 A_TakeInventory("PhotonRifleHeat",100)
        PRFG A 1 A_Lower
        LOOP
      Select:
        PRFG A 1 A_Raise
          LOOP
        Fire:
       PRFF B 0 BRIGHT A_GunFlash
       PRFF B 0 BRIGHT A_FireCustomMissile("PhotonSmoke",0,0,2,6)
       PRFF B 0 BRIGHT A_Jump(51,5)
       PRFF B 0 BRIGHT A_Jump(64,5)
       PRFF B 0 BRIGHT A_Jump(85,5)
       PRFF B 0 BRIGHT A_Jump(128,5)
          PRFF B 1 BRIGHT A_FireCustomMissile("PhotonBall",-4,1,10,0)
       Goto Fire+11
          PRFF B 1 BRIGHT A_FireCustomMissile("PhotonBall",-2,1,10,0)
       Goto Fire+11
          PRFF B 1 BRIGHT A_FireCustomMissile("PhotonBall",0,1,10,0)
       Goto Fire+11
          PRFF B 1 BRIGHT A_FireCustomMissile("PhotonBall",2,1,10,0)
       Goto Fire+11
          PRFF B 1 BRIGHT A_FireCustomMissile("PhotonBall",4,1,10,0)
       Goto Fire+11
       PRFF A 0 BRIGHT A_GiveInventory("PhotonRifleHeat",3)
       PRFF A 1 BRIGHT
       PRFG B 0 A_JumpIfInventory("PhotonRifleHeat",50,2)
       PRFG B 1
       PRFG A 0 A_JumpIfInventory("PhotonRifleHeat",75,2)
       PRFG A 1
          PRFG A 0 A_JumpIfInventory("PhotonRifleHeat",100,1)
       Goto Ready
       PRFG C 0 A_PlaySound("weapons/photonoverheat")
       PRFG C 0 A_FireCustomMissile("PhotonSmoke2",0,0,1,6)      
       PRFG C 1 A_TakeInventory("PhotonRifleHeat",1)
       PRFG C 0 A_JumpIfInventory("PhotonRifleHeat",1,1)
       Goto Ready
       PRFG C 0
       Goto Fire+19
   Flash:
       TNT1 A 1 A_Light2
       TNT1 A 1 A_Light1
       TNT1 A 0 A_Light0
       Stop
   }
}
User avatar
TheDarkArchon
OUT!
 
Joined: 07 Aug 2004
Location: Some cold place

Postby DoomRater » Mon Jun 13, 2005 12:12 pm

Yup. o_O although it's readable it would be better just to have the code in there.

By the way, that overheat tool is pretty cool too. It even slows down as it gets hotter!
User avatar
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308

Postby TheDarkArchon » Mon Jun 13, 2005 12:19 pm

It actually get's faster when it gets heated up. A feature I "borrowed" from TimeSplitters: Future Perfect.
User avatar
TheDarkArchon
OUT!
 
Joined: 07 Aug 2004
Location: Some cold place

Postby DoomRater » Mon Jun 13, 2005 12:23 pm

My bad. The jumps would have to be in reverse order in order to make it run slower.
User avatar
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308

Postby Phobus » Mon Jun 13, 2005 1:56 pm

Does it get to a point where it overheats? (ala TimeSplitters) It might be written in there but I haven't ever touched code outside of HTML and phBB.
User avatar
Phobus
Registered Occasional Lurker
 
Joined: 05 May 2005
Location: London

Postby TheDarkArchon » Mon Jun 13, 2005 2:05 pm

Code: Select allExpand view
       PRFG C 0 A_PlaySound("weapons/photonoverheat")
       PRFG C 0 A_FireCustomMissile("PhotonSmoke2",0,0,1,6)     
       PRFG C 1 A_TakeInventory("PhotonRifleHeat",1)
       PRFG C 0 A_JumpIfInventory("PhotonRifleHeat",1,1)
User avatar
TheDarkArchon
OUT!
 
Joined: 07 Aug 2004
Location: Some cold place

Postby DoomRater » Mon Jun 13, 2005 2:21 pm

Phobus wrote:Does it get to a point where it overheats? (ala TimeSplitters) It might be written in there but I haven't ever touched code outside of HTML and phBB.


Protip: Many states/variables/sounds are written in english and are chosen because they have the same dictionary meaning.
User avatar
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: Majestic-12 [Bot], MSN [Bot], Semrush [Bot] and 1 guest