[Added] Selective Autoaim for Weapon Functions

Moderator: GZDoom Developers

Selective Autoaim for Weapon Functions

Postby Ed the Bat » Wed Nov 14, 2012 6:16 pm

Currently, WEAPON.NOAUTOAIM affects every function on a weapon. If I have a weapon with, for instance, a secondary fire that shoots a gravity-prone projectile, I can add the NOAUTOAIM flag and lose autoaim for the primary fire, or forego the flag and cripple the secondary fire. Both are undesirable.

Is it possible to make this more flexible, such as flags that exclusively affect either primary or secondary fire? hopefully with a flag for functions such as A_FireCustomMissile and A_FireBullets?
Last edited by Ed the Bat on Sun Jun 22, 2014 11:58 pm, edited 1 time in total.
User avatar
Ed the Bat
I'm tired. I want to go home.
 
Joined: 03 May 2012
Location: Maryland, US

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby Xaser » Wed Nov 14, 2012 8:11 pm

Hmm, at this point, I'd feel more comfortable adding these as flags to weapon firing functions instead, since that's really a better place for customizing this sort of thing since you get full control over it.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby Ed the Bat » Wed Nov 14, 2012 8:15 pm

That sounds like more work, but other than that, I agree completely that it would be a richer solution.
User avatar
Ed the Bat
I'm tired. I want to go home.
 
Joined: 03 May 2012
Location: Maryland, US

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby Xaser » Wed Nov 14, 2012 8:18 pm

More work or not, it'd be for the better. The current function is troublesome because it's a blanket function that affects more than the modder intends. Adding separate flags for primary and secondary would result in a smaller blanket. At some point someone will complain about not being able to fire two projectiles at once and only have one of them follow autoaim. ;)
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby Ed the Bat » Wed Nov 14, 2012 8:23 pm

Xaser wrote:...fire two projectiles at once and only have one of them follow autoaim. ;)

*cough*Firemace.
:P
EDIT: Ah, I take it back. The Firemace is so much more of a mess than this, it really ought to be left alone for now and looked at later on. :)
User avatar
Ed the Bat
I'm tired. I want to go home.
 
Joined: 03 May 2012
Location: Maryland, US

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby Ed the Bat » Fri Jan 18, 2013 10:00 pm

It just occurred to me, after playing certain weapon mods, that making these flags specific to the actor pointers would also make it possible to control autoaim on non-weapons, such as inventory items that spew projectiles upon use. I killed myself trying to throw a grenade because auto-aim made it fly way too low.
User avatar
Ed the Bat
I'm tired. I want to go home.
 
Joined: 03 May 2012
Location: Maryland, US

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby cypherphage » Sat Jan 19, 2013 3:06 am

If this is added, and it really should be, I'd love a way to toggle it in weapon for instance when some frames of a weapon's states should be autoaimed while others shouldn't.
User avatar
cypherphage
 
Joined: 27 Feb 2011

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby jpalomo » Sat Jan 19, 2013 6:19 am

Xaser wrote:Hmm, at this point, I'd feel more comfortable adding these as flags to weapon firing functions instead, since that's really a better place for customizing this sort of thing since you get full control over it.

I agree with this. Wouldn't A_FireCustomMissile need to use the 3rd or 6th argument for flags? 3rd is useammo and 6th is aim.
User avatar
jpalomo
 
Joined: 17 May 2010

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby NeuralStunner » Sat Jan 19, 2013 10:43 am

jpalomo wrote:Wouldn't A_FireCustomMissile need to use the 3rd or 6th argument for flags? 3rd is useammo and 6th is aim.
Wouldn't need to, but might as well turn useammo into flags.
User avatar
NeuralStunner
Cuddly but Packin'
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby Xaser » Sat Jan 19, 2013 1:15 pm

Useammo would become a 'flags' field, that's correct. Aim already has more than two values, so it's not a boolean field. That one will stay as-is.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby Ed the Bat » Sat Jan 19, 2013 2:44 pm

As all this is happening, it might also be the perfect opportunity to finally see about giving railguns the ability to honor/deny autoaiming.
User avatar
Ed the Bat
I'm tired. I want to go home.
 
Joined: 03 May 2012
Location: Maryland, US

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby Ed the Bat » Wed Mar 13, 2013 2:57 am

I've been mulling this idea over some more, recently. I wasn't sure how much work it would be, because I didn't really take account of how many different functions would need to be updated. But, I went through the list just now, and since I feel it would be acceptable to just add this to the customizable ones, and leave the more rigid ones (like A_FirePistol) alone, since those weren't meant to be customized anyway...

It looks likes it just boils down to A_FireBullets and A_FireCustomMissile, as things stand now. I'd also like it for A_RailAttack, but since rails don't even support autoaim of any kind right now, that would be contingent on a separate feature suggestion I made, and won't be affected unless that gets approved. So, knowing it would only really require two (or maybe three) functions to get updated, I feel a bit more confident about the validity of this suggestion, because I would very much like to see it implemented.
User avatar
Ed the Bat
I'm tired. I want to go home.
 
Joined: 03 May 2012
Location: Maryland, US

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby Ed the Bat » Sun Jun 22, 2014 1:06 pm

Now that A_FireCustomMissile officially has a flags parameter, would it be possible to consider this again? For a long time now, I've had to hack up weapons where one method of fire needs to ignore autoaim and the other should not.
User avatar
Ed the Bat
I'm tired. I want to go home.
 
Joined: 03 May 2012
Location: Maryland, US

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby NeuralStunner » Sun Jun 22, 2014 8:40 pm

Thinking about it, I'm unsure whether this would work... How would the firing functions "know" which firing function initiated the attack?

Personally I would vote for all generic attack functions getting a noautoaim flag in them.
User avatar
NeuralStunner
Cuddly but Packin'
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293

Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY

Postby Ed the Bat » Sun Jun 22, 2014 8:43 pm

NeuralStunner wrote:Thinking about it, I'm unsure whether this would work... How would the firing functions "know" which firing function initiated the attack?

Personally I would vote for all generic attack functions getting a noautoaim flag in them.


I'm pretty certain that the several posts preceding my latest bump are to that tune (read: I agree with you). I only proposed it as a flag the first time because I thought it would have a better chance of being done quicker. 19 months later, I wonder if I would've been right about that. :P
User avatar
Ed the Bat
I'm tired. I want to go home.
 
Joined: 03 May 2012
Location: Maryland, US

Next

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests