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!
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.
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!
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?
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.