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"

HUD Binding doesn't seem to get called

Hi there, after scouring the internet, I decided to just ask the question myself instead of banging my head against this problem as I cannot figure it out by myself.

I'm trying to make a progress bar in UMG which fills up when the player interacts with an actor in my scene. Once the player isn't interacting with the actor anymore I want the progress bar to stop filling up and stay at the value until the player interacts with the actor again.

I Started with creating the HUD and binding a function to my progress bar which should fill up. Then I created a variable called Studypoints in the actor BP. I let it gradually increase with a simple deltaseconds added to the value if the player has interacted with the actor. In my function I made a variable of my actor BP and call the Studypoints variable from it, then divide it by 100 to get a percentage which I output into the return node on the function.

I know my calculations in my Actor BP are working because the printfunction shows the value increasing when the player interacts with the actor. I also know that my HUD is enabled and it updates as I've already successfully added a "Press E to interact" prompt when close to the actor. When I incorporate a printfunction inside my progressbar function, nothing will show which leads me to believe that my bound function never even gets called.

I'm pretty new to unreal so it might just be me overlooking a simple checkbox. But any help would be appreciated!alt text

Product Version: UE 4.18
Tags:
bp-actor.jpg (110.9 kB)
bp-hud.jpg (246.0 kB)
bp-widget.jpg (140.7 kB)
hud-example4.gif (3.9 MB)
more ▼

asked Jun 13 '18 at 09:55 PM in Blueprint Scripting

avatar image

j-gt
1 1

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

1 answer: sort voted first

Hi I'm not the best in english but if you dont understand why your progress bar are not moving... 0 mean empty and 1 = full bar. So be sure the studypoint value stay between 0 and 1. Hope thats what you're looking for

more ▼

answered Jun 13 '18 at 10:40 PM

avatar image

Denis Lambert
310 4 4 8

avatar image j-gt Jun 13 '18 at 10:52 PM

Thanks Denis for the quick response! In my bpwidget picture I made sure to divide my float value for the studypoint by 100 so it should always be between 0.0 and 1.0. Do you think it’s necessary to add a clamp to make sure it doesn’t go below or beyond 0.0 and 1.0? And if so should I clamp the value in my widget function or in my blueprint? Thanks anyway. I think it has more to do with either the studypoint value never getting called by the function or the entire function never being executed as the hello world string also never shows up which I placed inside the widgetfunction. Do you have any idea as to why that may be?

(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