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 Reloading Blueprint Error

Hi, so I've set up some basic script to allow the player to reload their weapon. The script works fine as long as max ammo is greater than magazine size. Even after this statement becomes false, the max ammo gets deducted correctly, but the issue I'm having is that the max ammo is not correctly adding onto ammo. I know from the screen capture that I'm simply adding the amount of ammo fired onto the ammo, but if I try to add max ammo to ammo the script will result in the values simply adding 0 + 0. I'm super confused and have absolutely no idea how to fix this :( Any help will be greatly appreciated.alt text

Product Version: UE 4.16
capture.jpg (146.5 kB)
more ▼

asked Sep 23 '18 at 02:37 PM in Blueprint Scripting

avatar image

33 16 19 23

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hey, i think i found the issue, you should not include ammos already in magazine in MaxAmmo, so i made some modification and i found this script :

alt text

Hope this help, Araan

screen04.png (237.8 kB)
more ▼

answered Sep 23 '18 at 03:49 PM

avatar image

44 1 2 7

avatar image AkatoshReturns Sep 23 '18 at 03:55 PM

This works! Thank you so much, for some reason my brain couldn't get around this :(

(comments are locked)
10|2000 characters needed characters left
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