Reloading using a loop with an animation montage delay

Hey everyone. I am working on my own FPS project and have come up on a issue.

What I want to achieve is reloading a shotgun by playing an montage and repeating this montage
until the magazine tube is full. Now this sounds pretty simple and coming from unity this was pretty
easy to achieve using IEnumarators.

So let me clear this up when a player presses their reload key presumably R a montage will play where the player places the shotgun up to get it ready to reload. Then after this a loop of some kind will play the insert shell montage wait until its done then do it again and again until the magazine tube is full then when its completed it will play another montage returning the gun to its original position.

I have tried some stuff and done a lot of research but I couldn’t figure it out apparently while loops cannot wait any delays and since a montage will wait until its completed it crashes. If anyone can help me with this It will be much appreciated. Please explain it too since this project is just to learn and I don’t want to just take your code and paste it in. Thank you for taking your time to read this. Here is some snippets of my blueprint code.

Use a Timer to create an event loop.

You can eliminate the “Reload Count” var and use ((shotgun mag max - ammo mag) > 0 ) instead to reduce variables. Just wanted in their for understanding of how the loop is controlled.

1 Like

Great! It worked just fine, I appreciate you helping out, it took me a while to respond due to me trying to play around with it personally and I got distracted in general. Thank you!