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"

When I pickup objects in the world I want to add 1 ammo to my projectile, which needs to be at 0 by default, and when he throw one projectile it drop by one.

Hi guys. I have a ThirdPersonCharacter_BP, one PickupObject_BP and one ProjectileBP. When I pickup the PickupObject_BP I want to add 1 ammo to the ProjectileBP. When the game start, ProjectileBP need to have 0 ammo by default.( so it cannot be fired) and add 1 when PickupObject_BP .

So far, when I PickupObject_BP it disappears but my ProjectileBP can fire infinite Projectile no matter what.

Any clues ?

Product Version: UE 4.18
more ▼

asked Mar 18 '18 at 04:14 PM in Blueprint Scripting

avatar image

1 1 2 5

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

1 answer: sort voted first

whats your current blueprint look like? maybe we can modify it to work. basically you are going to need some flow control to determine whether the projectile can be fired. your going to want to have a branch that is connected to something like : get ammo -> ammo > 0 -> branch. so it will say is the ammo greater than 0 if true then you can fire, if not you cant fire.

more ▼

answered Mar 18 '18 at 04:20 PM

avatar image

10k 33 8 23

avatar image Jmc_ARTmod Mar 18 '18 at 04:49 PM

So far I got this. I just dont know what to put where, and in which BP. I'm a novice :(

alt text

avatar image ThompsonN13 Mar 18 '18 at 04:59 PM

to control if the bombs can be spawned and eliminate them being spawned infinitely just do a basic check either at the input or at the event (like in the picture below). the method used is as described above.

alt text

capture.png (85.8 kB)
avatar image Jmc_ARTmod Mar 18 '18 at 05:17 PM

The only thing is that the player has 1 ammo when it begin. How to set it to zero ?

avatar image Jmc_ARTmod Mar 18 '18 at 05:20 PM

Nevermind I just had to put it to zero. thank you man you're the best!

avatar image ThompsonN13 Mar 18 '18 at 07:35 PM

glad to know it helped. got your homework assignment all done now?

avatar image Jmc_ARTmod Mar 18 '18 at 10:33 PM

Actually not at all. We have to create an entire prototype! If you want to be part of the team we can give you credit ( you will already have credit btw) since it is a student project. Our game has been presented to Ubisoft and have received the approval.

(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