x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Ammo Difficulty

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

alt text

Product Version: UE 4.16
Tags:
fire-function.png (391.3 kB)
more ▼

asked Oct 29 '17 at 08:13 PM in Blueprint Scripting

avatar image

jayash
1 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

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)

more ▼

answered Oct 30 '17 at 12:09 AM

avatar image

Entropikz
113 18 22 26

avatar image jayash Oct 30 '17 at 12:27 AM

can you show me an example ?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

bpweapon.zip (41.7 kB)
more ▼

answered Oct 30 '17 at 01:24 AM

avatar image

Entropikz
113 18 22 26

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

it comes up in notepad?

more ▼

answered Oct 30 '17 at 01:43 AM

avatar image

jayash
1 1 2

avatar image Entropikz Oct 30 '17 at 01:47 AM

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.

avatar image jayash Oct 31 '17 at 01:13 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question