# For weapons capable of automatic firing, how to add a delay to single-shot?

**URL:** <https://forums.unrealengine.com/t/for-weapons-capable-of-automatic-firing-how-to-add-a-delay-to-single-shot/400676>\
**Category:** Blueprint\
**Tags:** gun, shooter-game, unreal-engine, UE4, Blueprint, question, set-timer\
**Created:** [July 26, 2017, 1:33am UTC](https://forums.unrealengine.com/t/for-weapons-capable-of-automatic-firing-how-to-add-a-delay-to-single-shot/400676 "2017-07-26T01:33:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iLukey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@iLukey](https://forums.unrealengine.com/u/iLukey)\
**Post date:** [July 26, 2017, 1:33am UTC](https://forums.unrealengine.com/t/for-weapons-capable-of-automatic-firing-how-to-add-a-delay-to-single-shot/400676/1 "2017-07-26T01:33:26Z")

</div>

I’ve set up automatic fire using blueprints & timers similarly to [this post.](https://answers.unrealengine.com/questions/344301/how-do-i-make-a-weapon-fire-fully-automatic.html)

Shooting is achieved by an event that fires a bullet and loops every second(or WeaponFireRate). Automatic fire works great and as expected. The issue is that some weapons that I want to use will have a slow firing rate with automatic fire and you can circumvent that by rapidly clicking left click. I’ve tried some fixes like setting a variable “isFiring” on and off in spots and branching the firing with that but I must’ve missed something because that didn’t work; also tried a time-consuming workaround involving a cooldown timer set to the duration of the remaining OnFire timer before that gets cleared with my StopFiring event – huge waste of time because I couldn’t figure it out there as well.

Has anyone solved this issue before or know of a way to fix it? I’ve searched around a bit and found one post having the same issue but no answer.

---

<div class="post-metadata">

**Author:** ![MasterFuzzFuzz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MasterFuzzFuzz](https://forums.unrealengine.com/u/MasterFuzzFuzz)\
**Post date:** [November 8, 2017, 11:33pm UTC](https://forums.unrealengine.com/t/for-weapons-capable-of-automatic-firing-how-to-add-a-delay-to-single-shot/400676/2 "2017-11-08T23:33:14Z")

</div>

I’ve looked for weeks on this topic and haven’t seen a single video even gloss over it

---

<div class="post-metadata">

**Author:** ![Denis\_Lambert](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denis\_Lambert](https://forums.unrealengine.com/u/Denis_Lambert)\
**Post date:** [November 9, 2017, 4:49pm UTC](https://forums.unrealengine.com/t/for-weapons-capable-of-automatic-firing-how-to-add-a-delay-to-single-shot/400676/3 "2017-11-09T16:49:50Z")

</div>

Hi iLukey. I’ve got something for you an your automatic rifle :P. You have to set the speed (BPM) you want for each weapon and set them as automatic or not. With those variable you’ll be fine to make something like this. So everygun with shoot a different speed with BPM variable and the retriggerable delay if your weapon are automatic or not.  
So you can hold the fire key and shoot everything 😃  
Dont forget for managing all the different info for all gun i’m working with data table.

 ![219672-bpmbullet.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/0/2/602f5b9a0dc5442f8fc9a7ed3cff501cbb86b640.png)

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [April 6, 2025, 7:50pm UTC](https://forums.unrealengine.com/t/for-weapons-capable-of-automatic-firing-how-to-add-a-delay-to-single-shot/400676/5 "2025-04-06T19:50:46Z")

</div>

Among many other criteria I use a `bIsFiring?` bool in a macro. The macro is called several times across the processing of the input action.

The character class, where input is handled, I use a different variant of the macro check. It’s quite a bit more simplified. It basically just checking that the base conditions are met. Has a gun, it’s equipped, you aren’t jumping or in water (swimming).

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/e/d/9edf5dcb647faa925d29039527a1630b325d39c3.png)

If the check clears I call `Client Weapon Fire` in the weapon class. It’s job is to determine the firing mode to use vs the client outright calling a mode. All weapon logic is handled in the weapon class.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/2/f/12fd2a4b9d605c8dfc45a5ec19e6a6ed47de99f3.png)

Input → Can Fire (character) → `Client Fire Weapon` → Can Fire (weapon) → Switch(mode)

* * *

For Single fire we call the `Semi Auto Firing`.

`Single Autonomous Firing` executes a macro that checks firing conditions. It’s conditions are purely about the states of the weapon. No consideration for character movement or environment.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/8/c/78c2d97bb21c4fe788380f82d03bc01147d68264.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/3/b73c9b58672b4cc23c842b8148abe932eb0d06da.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/e/b/6eb128c5857b5b967beb8a11954c051c92b01f14.png)

Upon meeting macro conditions we sequence through the firing logic (projectile prep) and then call the Obj Pool for a projectile. The `Semi Auto ROF Timer` is called directly after which sets `bIsFiring?` to True. The server is RPC’d on the next sequence step.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/9/709f0357d64c98d1edf9b8041eb262ed0c4e8dfc.png)
