# Ammo Difficulty

**URL:** <https://forums.unrealengine.com/t/ammo-difficulty/408259>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, Blueprint, question\
**Created:** [October 29, 2017, 8:13pm UTC](https://forums.unrealengine.com/t/ammo-difficulty/408259 "2017-10-29T20:13:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_63ba55a2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_63ba55a2](https://forums.unrealengine.com/u/anonymous_user_63ba55a2)\
**Post date:** [October 29, 2017, 8:13pm UTC](https://forums.unrealengine.com/t/ammo-difficulty/408259/1 "2017-10-29T20:13:47Z")

</div>

Am new to this engine and i been struggling trying to add ammo to my weapon if anyone can help i would appreciate it just send me the ammo blueprint and i copy it from there thanks

my fire function

 ![218344-fire-function.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/a/b/aab147ea8bc356f11f19b54e04444d20d0ab1081.png)

---

<div class="post-metadata">

**Author:** ![Entropikz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Entropikz](https://forums.unrealengine.com/u/Entropikz)\
**Post date:** [October 30, 2017, 12:09am UTC](https://forums.unrealengine.com/t/ammo-difficulty/408259/2 "2017-10-30T00:09:28Z")

</div>

My best recommendation is to store two integers in your character, or gun/magazine (depending on how your mechanics work) for realism. One for current ammo and one for max ammo. Then when you call your spawn bullet function, subtract 1 from your current ammo (you can set a branch to disable your gun when youre out of ammo as well). Then set up character input to set your ammo to your max ammo variable (you can throw in delays and anims for ambient features)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_63ba55a2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_63ba55a2](https://forums.unrealengine.com/u/anonymous_user_63ba55a2)\
**Post date:** [October 30, 2017, 12:27am UTC](https://forums.unrealengine.com/t/ammo-difficulty/408259/3 "2017-10-30T00:27:00Z")

</div>

can you show me an example ?

---

<div class="post-metadata">

**Author:** ![Entropikz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Entropikz](https://forums.unrealengine.com/u/Entropikz)\
**Post date:** [October 30, 2017, 1:24am UTC](https://forums.unrealengine.com/t/ammo-difficulty/408259/4 "2017-10-30T01:24:58Z")

</div>

link text

Here’s a quick example. I can’t test it right now because I have to get working on some other stuff, but let me know what happens.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_63ba55a2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_63ba55a2](https://forums.unrealengine.com/u/anonymous_user_63ba55a2)\
**Post date:** [October 30, 2017, 1:43am UTC](https://forums.unrealengine.com/t/ammo-difficulty/408259/5 "2017-10-30T01:43:25Z")

</div>

it comes up in notepad?

---

<div class="post-metadata">

**Author:** ![Entropikz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Entropikz](https://forums.unrealengine.com/u/Entropikz)\
**Post date:** [October 30, 2017, 1:47am UTC](https://forums.unrealengine.com/t/ammo-difficulty/408259/6 "2017-10-30T01:47:40Z")

</div>

You’ll need to copy the files into your project since they’re uassets. I did it in BP, but if you’re looking for C++ I’ll work on that later.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_63ba55a2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_63ba55a2](https://forums.unrealengine.com/u/anonymous_user_63ba55a2)\
**Post date:** [October 31, 2017, 1:13am UTC](https://forums.unrealengine.com/t/ammo-difficulty/408259/7 "2017-10-31T01:13:16Z")

</div>

it comes up with notepad can you send the download link again
