Speed property for A_Raise/A_Lower

Moderator: GZDoom Developers

Post Reply
User avatar
Minigunner
Posts: 754
Joined: Mon Dec 28, 2009 5:13 pm

Speed property for A_Raise/A_Lower

Post by Minigunner »

As mentioned in the wiki articles for A_Raise and A_Lower, there is a method for modifying the speed at which a weapon raises/lowers; however, it is limited in the factor in which the speed is multiplied (e.g. 1/3, 1/2, 2, 3, ect.), and a slower raise/lower using this method is (of course) not as smooth.
I ask that a Speed property be implemented for more flexibility, especially since mods such as DoomRL Arsenal make liberal use of the current method.

Also, as was pointed out to me, there's already a variable for the raise/lower amount (which is hard-set to 6.0). This could be used for the above suggested property such that A_Raise(3.0) would raise the weapon at half the speed, similar to the speed of a 2-tic A_Raise frame. Alternatively, for simplicity, the property can be a factor, so that A_Raise(0.5) would result in the same.
Last edited by Minigunner on Thu Aug 14, 2014 12:47 am, edited 2 times in total.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Speed property for A_Raise/A_Lower

Post by NeuralStunner »

I would say that a speed factor is better.
D2JK
Posts: 545
Joined: Sat Aug 30, 2014 8:21 am

Re: Speed property for A_Raise/A_Lower

Post by D2JK »

Good that I saw this before submitting a duplicate request.

I agree this addition would be rather useful. For fast weapon switches, I currently use the "weave in zero-tic A_Lowers/Raises" method. Also, in lack of proper sprites, they're often useful for weapon reloads, cooldowns, etc (or to lower the gun when delivering a quick punch)... the default speed (6, as pointed out by OP) just isn't always desirable.

The Offset - keyword is another possibility, but it would simplify the decorate code if, instead of writing a great number of Offsets, you could just adjust the speed parameter in A_Lower/Raise instead, and loop it.

If you don't mind, I'll post a few illustrative examples.

Example 1:
Spoiler:
Example 2:
Spoiler:
User avatar
Xtyfe
Posts: 1490
Joined: Fri Dec 14, 2007 6:29 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Re: Speed property for A_Raise/A_Lower

Post by Xtyfe »

This would be awesome, heavier guns could take a longer time for example.
User avatar
Onar4241
Posts: 296
Joined: Sun Aug 03, 2014 9:41 am
Location: New York

Re: Speed property for A_Raise/A_Lower

Post by Onar4241 »

This should be added. I'd like to increase the speed in a specific manner.
D2JK
Posts: 545
Joined: Sat Aug 30, 2014 8:21 am

Re: Speed property for A_Raise/A_Lower

Post by D2JK »

Since nobody seems to be tackling this, I'll give it a shot.

Would this code work?
Spoiler:
The original code can be found in OP's link.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”