# How to modify the Blueprint FPS example to rapid fire?

**URL:** <https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848>\
**Category:** Blueprint\
**Tags:** fps-shooter-game-sam, unreal-engine, question\
**Created:** [June 3, 2014, 6:45am UTC](https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848 "2014-06-03T06:45:00Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_44d624c2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_44d624c2](https://forums.unrealengine.com/u/anonymous_user_44d624c2)\
**Post date:** [June 3, 2014, 6:45am UTC](https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848/1 "2014-06-03T06:45:00Z")

</div>

Could someone please guide me towards a tutorial or hint that would explain how to modify the character blueprint contained in the FPS example to rapidly fire the gun with the left mouse button held down?

---

<div class="post-metadata">

**Author:** ![HoOz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HoOz](https://forums.unrealengine.com/u/HoOz)\
**Post date:** [June 3, 2014, 7:33am UTC](https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848/2 "2014-06-03T07:33:08Z")

</div>

You can achieve this by using the gate node ([Gate node official documentation][1])

the idea is to loop every period of time (fire rate) and fire our projectile,

here is how to do so :

- open “MyCharacter” blueprint and go to “Spawn projectile” code.
- Add a sequence, a gate, a sequence and a retriggerable delay nodes
- The first sequence node is to enter and open our gate when “Input action fire” event is pressed
- The gate will be closed when “Input action fire” event is released i.e when we stop firing
- when the gate is open we want to fire every period of time, and this why we need the retriggerable delay node

Here’s a snapshot of the final result 🙂

 ![7602-zzzxcd.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/a/daa0b3bb8ae0583d9765fe00d54faddd936a3345.jpeg)

you can change fire rate by changing the value of “Duration inside” “Retriggerable delay” node

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_44d624c2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_44d624c2](https://forums.unrealengine.com/u/anonymous_user_44d624c2)\
**Post date:** [June 3, 2014, 9:25am UTC](https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848/3 "2014-06-03T09:25:31Z")

</div>

Wow… Thank you so much. It’s like a difficult puzzle or something, I would have never figured that out on my own. How did you learn it? Well, my new gattling gun and I thank you immensely!!

 ![7607-yyyyyyeah2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/5/0c5463a9504b192ed07035bfffc441e2be979589.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_abdae113](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_abdae113](https://forums.unrealengine.com/u/anonymous_user_abdae113)\
**Post date:** [February 17, 2015, 10:11pm UTC](https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848/4 "2015-02-17T22:11:11Z")

</div>

“Retriggerable delay” node is not there anymore how can we do it now to shoot automatic

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_abdae113](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_abdae113](https://forums.unrealengine.com/u/anonymous_user_abdae113)\
**Post date:** [February 17, 2015, 10:24pm UTC](https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848/5 "2015-02-17T22:24:37Z")

</div>

i found out with the delay component it has duration to

---

<div class="post-metadata">

**Author:** ![Ardoc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ardoc](https://forums.unrealengine.com/u/Ardoc)\
**Post date:** [March 23, 2015, 11:01pm UTC](https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848/6 "2015-03-23T23:01:50Z")

</div>

This is a great solution for this, many thanks!

---

<div class="post-metadata">

**Author:** ![DaveL88](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DaveL88](https://forums.unrealengine.com/u/DaveL88)\
**Post date:** [June 11, 2015, 4:21pm UTC](https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848/7 "2015-06-11T16:21:55Z")

</div>

I know this has been answered. But as a newbee I found the following alternative solution to this problem.

I set an timer which is looping (In this case it is triggered by event begin play, but could also be triggered by anything else) which calls the custom event “ShootingLoop”. Inside the ShootingLoop i then spawn the projectile etc. The fire rate is controlled by the time node on the timer. See screenshots.

However If I spawn multiple projectiles this way I have the feeling it eats a lot of ressources. Can someone with a little more experience explain which function is more expensive etc.?

Cheers!

---

<div class="post-metadata">

**Author:** ![Dividual](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dividual](https://forums.unrealengine.com/u/Dividual)\
**Post date:** [October 6, 2015, 11:22am UTC](https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848/8 "2015-10-06T11:22:40Z")

</div>

there’s a problem with this: if you rapidly click, you could theoretically fire infinitely fast, since the first bullet always gets fired without a delay. this becomes very noticeable if you increase the waiting time.

here’s my version:

 ![61500-pewpewpew.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/e/cde3321fbce567054d98c12d61cd1ece0f67ac68.png)

Note that `Fire` is just a custom event that fires one shot.

---

<div class="post-metadata">

**Author:** ![Vallamost](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vallamost](https://forums.unrealengine.com/u/Vallamost)\
**Post date:** [May 29, 2019, 2:57am UTC](https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848/9 "2019-05-29T02:57:49Z")

</div>

It’s definitely still there in 4.22.2

---

<div class="post-metadata">

**Author:** ![will108](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/will108/32/741192_2.png) [@will108](https://forums.unrealengine.com/u/will108)\
**Post date:** [May 26, 2023, 11:49am UTC](https://forums.unrealengine.com/t/how-to-modify-the-blueprint-fps-example-to-rapid-fire/284848/10 "2023-05-26T11:49:07Z")

</div>

Does anyone know how to do this in UE 5.2.0?  
Thanks  
Will
