Lyra How do I set a fire rate that exceeds the frame rate?

I created a new weapon in Lyra.

I set the Fire Delay time Secs of the GA Weapon Fire class to 0.01, but at most only one shot is fired per frame.

How can I create a weapon with a higher Fire Rate?

the best way would be to simulate it

you could spawn 2 projectiles per frame but youd get the same result so its a waste of performance and could cause collision problems, instead count the number of hits and apply damage twice or more

1 Like

Thank you.
By editing the BP of WeaponFire, I was able to damage it for a number of times beyond the frame rate.
/Script/Engine.Blueprint'/Game/Weapons/GA_Weapon_Fire.GA_Weapon_Fire

However, this implementation does not calculate the exact damage.
For example, suppose you have a weapon that fires 100 rounds per second.
If the game is at 10 FPS, we know that it should do 10 damage per frame.
If the game is at 60 FPS, that would be 1.66 times; is it better to give the weapon a 60% chance of inflicting the second hit? Or would it be 1.66 times the damage at DPS?

either is fine depending on your game and how you handle it.

if the damage is final then it wont matter much, but say if you were going to test against armor then fractional damage may behave weird.
personally id truncate it and carry it over to the next shot so 1.6 is 1 shot, carry .6, next shot is 2.2 so 2 shots etc

1 Like

I had not thought of the idea of carrying it over. Thank you very much for your help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.