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"

UE4 Progress Bar on Actors

I need a system like dead by daylight where you can go up to an actor and start to repair it, any ideas on how I can accomplish this?

Product Version: UE 4.21
Tags:
more ▼

asked Apr 10 '19 at 02:57 PM in Using UE4

avatar image

ItsLightsaber09
15 2 3 5

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

1 answer: sort voted first

Check out video #9. I think it is what you are looking for :)

https://www.youtube.com/playlist?list=PLyu-W38DvZhqOdaCkB4hGWYQzuKH2gALZ

more ▼

answered Apr 10 '19 at 05:52 PM

avatar image

Nebula Games Inc
5.4k 28 9 15

avatar image ItsLightsaber09 Apr 11 '19 at 02:32 PM

I should add a few things : Its multiplayer, meaning multiple people need to work on the same actor, and it needs to multiply the more people are on it, and when the progress bar is finished I wanna make it so it destroys an actor, to act as a sort of exit gate. Again, the way the generators are in Dead by Daylight ~~~I said a lot so let me simplify as well~~~ The variable should be saved within the actor so multiple people can access it, rather than having their own individual one, and when the progress bar is full it should destroy an actor (this could potentially be done within the level blueprints which is why I want the variable to be saved in the actor and not the widget)

avatar image Nebula Games Inc Apr 11 '19 at 02:45 PM

Aside from actually testing this in a multiplayer game I am not sure how what I recommended isn't a perfect solution for this. The node works on a 3D widget yes, BUT it isn't just a simple "node" like "increment int" or something that you can use literally anywhere and isn't connected to anything. What I created was an "actor component" which means it MUST be attached to a specific actor. When you attach this actor component to an actor all it does is a bunch of calculations under the hood. The "progress bar" is something you feed into the node to tell it how to display all the calculations it is doing. So the progress bar could be a viewport widget or a 3D widget (I assumed it would be best with the latter). So to access the "variable" you simply cast to the actor, get the actor component and through the component you have direct access to the variables being used within. There is also a node to "alter time" which allows you to speed up the rate the progress bar fills. When a second person or third in your multiplayer game comes along to help and you want things to move faster, simply call this node by accessing the actor component and input a new "speed" and watch the magic happen. As for your final piece about "destroying" the actor when it finishes, I placed a few custom blueprint implementable events into this actor component that fire off at specific cycle lengths, say every 5 min or 1 hr. There is also one that will execute when the bar has completed filling or emptying depending which way you want to go (it allows for both). You could use that event to execute a destroy actor node. So, like I said, I think it is exactly what you are looking for.

avatar image ItsLightsaber09 Apr 11 '19 at 07:56 PM

I hadnt checked the video, i just wanted to make sure It had what I needed

avatar image ItsLightsaber09 Apr 11 '19 at 07:59 PM

Oh and about destroying the actor, i didnt mean the one youre doing all the progress bar things on, I mean a completely different actor, like a door or wall. In the future its going to allow you to open a door, that you wouldnt be able to unless the progress bars are full

avatar image Nebula Games Inc Apr 12 '19 at 05:22 AM

It can do that. You just need to feed the blueprint implementable event a reference to the actor you want destroyed and just hook the two up to a destroy node. Like I said, if you check the video the first min or so explains all of this. If you don't like the intro no need to finish. But I demonstrate everything it can do first so it's worth taking a look and then we can discuss any other questions you have.

avatar image ItsLightsaber09 Apr 13 '19 at 01:28 PM

I actually did end up doing it by saving variables to a game mode class, and calling those variables through the widget. I do appreciate you being so active on this post though :)

avatar image Nebula Games Inc Apr 13 '19 at 02:24 PM

Whatever works for you. It's your game, just thought I'd offer you an all in one solution that appears to be exactly what you described but if you have a better way you have a better way haha

(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