A_FireInnacurate

Moderator: GZDoom Developers

Post Reply
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

A_FireInnacurate

Post by DoomRater »

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 all

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

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
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

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
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post by Anakin S. »

How about this?

Code: Select all

   	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
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

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 all

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
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

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
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

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
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

You mean something liek this?

Code: Select all

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
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

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
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

It actually get's faster when it gets heated up. A feature I "borrowed" from TimeSplitters: Future Perfect.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

My bad. The jumps would have to be in reverse order in order to make it run slower.
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Post by Phobus »

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
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

Code: Select all

       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
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

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.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”