Selective Autoaim for Weapon Functions
Moderator: GZDoom Developers
-
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
Selective Autoaim for Weapon Functions
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?
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 10:58 pm, edited 1 time in total.
-
-
- Posts: 10773
- Joined: Sun Jul 20, 2003 12:15 pm
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
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.
-
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
That sounds like more work, but other than that, I agree completely that it would be a richer solution.
-
-
- Posts: 10773
- Joined: Sun Jul 20, 2003 12:15 pm
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
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.
-
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
*cough*Firemace.Xaser wrote:...fire two projectiles at once and only have one of them follow autoaim.
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.
-
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
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.
-
- Posts: 213
- Joined: Sun Feb 27, 2011 2:54 am
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
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.
-
- Posts: 772
- Joined: Mon May 17, 2010 9:45 am
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
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.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.
-
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
Wouldn't need to, but might as well turn useammo into flags.jpalomo wrote:Wouldn't A_FireCustomMissile need to use the 3rd or 6th argument for flags? 3rd is useammo and 6th is aim.
-
-
- Posts: 10773
- Joined: Sun Jul 20, 2003 12:15 pm
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
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.
-
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
As all this is happening, it might also be the perfect opportunity to finally see about giving railguns the ability to honor/deny autoaiming.
-
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
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.
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.
-
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
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.
-
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
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.
Personally I would vote for all generic attack functions getting a noautoaim flag in them.
-
- Posts: 3060
- Joined: Thu May 03, 2012 1:18 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Maryland, US
Re: +WEAPON.NOAUTOAIM_PRIMARY/SECONDARY
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.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.