Download

Blueprint Fps reloading delay

I was following a tutorial on youtube about reloading system you guys check it out here https://www.youtube.com/watch?v=qrniRVBfgW8
In tutorial series he showed how to create ammo system. But I have a problem when player click R for reload gun reload instantly, I want to make a reload delay (gun takes time to reload) how do I do it using blueprint Please Help.

Hi,

Use a delay node. Right click in your blueprint and just press delay :smiley: Simlpe as that and there add the seconds of the delay you want

Normally this is driven through the Animation. Let’s say you have a 3 Seconds long Animation for reloading (self made or bough from the market maybe).
If you Play the Animation, you can get the length of this Animation (which will be 3). This can be used to start a Delay or better a timer.
The timer will fire your real reload function after 3 seconds.

So your setup should be a function that starts the animation if you press R and this function should start a timer with the length of the animation.
This Timer should call a second function which will update the numbers of your ammo and maybe set a bool that controls if the player is already
reloading back to false. The bool = true would be placed in the first function.

Thank you!

+Innos it worked thanks!!
eXi how would i cancel reload if player fire aweapon??

Either you don’t let him fire while reloading (that’s what the “IsReloading” bool is for) or you check if he is reloading
with that bool and clear the timer, as well as stopping the animation, as soon as he tries to fire.

Sorry for my noobness but i didn’t understand can you explain in simple words.

That’s not a problem (:. To be honest, a correct weapon setup is a bit more work when most people think.

I can only describe you want this is about, since i have no time building this for you to show it in pictures:

Let’s say you have a Function called “FireWeapon”. This is called when you press and hold your left mouse button.
Now let’s say you have a second Function called “StartReloading”, which is called when you press the R key.
Also a third one called “StopReloading”, which is called either when the whole Reload thing is done or when you start firing.
And another function actually called “Reload”, which will update the Ammo!

So, furthermore, let’s also say you have a boolean variable (can be true or false) which is called “IsReloading”.

The basic execution path of this would be the following:

Player presses R and calls “StartReloading” -> In “StartReloading” check if “IsReloading” is true, if yes then abort, if not set “IsReloading” to true (to prevent multiple reload) and call your (maybe) 3 second long Reload animation. Also start a so called “Timer” (you might want to look up what this is) with 3 seconds which should call “Reload”

Once the 3 Seconds are over, “Reload” is called, this will update your Ammo like you want it to be. “Reload” also calls “StopReloading” -> “StopReloading” will set the “IsReloading” bool to false, so you could reload again. It will also check if the Animation is running and will stop it if yes (this is for the fire weapon later) AND clear/stop the Timer you started!

Now when the player presses the left mouse button, you call “FireWeapon”. In “FireWeapon” you check if “IsReloading” is true (so you know if we are currently reloading). If yes, call “StopReloading” which will set “IsReloading” to false and stop the reload animation. Since the timer is still running and not yet complete, it will be cleared/stopped and “Reload” is skipped.

I hope that makes sense. I can’t offer more help ): You may want to check some tutorials. I’m sure someone out there on youtube made a tutorial about this.

Thanks a lot for all your help. I will Post WIP video of my weapon system and post it here.

I have successfully created a automatic rifle with the rich reload system and I have also created a working weapon switch system. Thanks Everyone!