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"

How can I run different Progress Bars triggered by the same action? (item picked up)

I have a pickup which will have many copies around the world. Whenever my player picks one up, I want it to start a progress bar so when the bar gets empty, the pickup disappears.

BUT, when my player picks up that same object again, I want another bar to start counting without affecting the first. I guess lots of booleans don't work, already tried that. Please help!

Product Version: UE 4.21
Tags:
more ▼

asked Mar 28 '19 at 05:29 PM in Using UE4

avatar image

NtinosFerret
17 2 2 4

avatar image Nebula Games Inc Mar 28 '19 at 06:21 PM

I am actually working on something that may be perfect for you. It is a custom C++ node I am building for pretty much this purpose. (Don't worry, you will just copy/paste code, I will walk you through it). I should have the tutorial up in a day or two. It will be an actor component that modifies a progress bar from a widget you fed it. You input the time, game speed, fill or empty the bar, starting percent etc A bunch of stuff you can customize to your liking. It also has a built in event that fires off (you script what it does exactly in blueprints, the C++ will just fire out the order to do what you say in blueprint) when the progress bar is completely full or empty depending on which direction you are going. All you would need to do is attach a "destroy" actor node to the custom event and your thing should disappear. And since it is an actor component you just add it to the base class and each instance or version of your pickup will have its own copy. I will post a link when I finish the node.

avatar image NtinosFerret Mar 28 '19 at 06:40 PM

Thanks for your reply, I will absolutely check your tutorial! The more I work with Blueprints the more I understand C++ so it won't be much of a problem. However, in theory, and for everyone looking for something like that in BP, how would you go about it in Blueprints? Would it be an endless run of nodes or something minimal?

avatar image Nebula Games Inc Mar 28 '19 at 07:20 PM

I would just have a 3D widget component in the pickup actor blueprint and use a timeline or timer to set the progress bar percent value on overlap. This wouldn't be affected by having multiple instances of the pickup in the world since each pickup gets its own progress bar widget.

avatar image NtinosFerret Mar 28 '19 at 08:32 PM

Yeah that makes sense! I will try it and get back with an answer to resolve this for everyone to see and I m looking forward to your tutorial!

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

0 answers: sort voted first
Be the first one to answer this question
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