Announcement

Collapse
No announcement yet.

[Blueprints & UMG] Looping Progress Bar and Nested Listen for OnClick Button Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Blueprints & UMG] Looping Progress Bar and Nested Listen for OnClick Button Question

    NOTE* I'm using Blueprints and UMG.

    I'm trying to figure out the best way to achieve a looping progress bar. It's not "looping" in the traditional sense, but I'll try my best to explain it.

    Currently, I have a UMG Progress Bar that starts filling (by 2% per tick) after an OnClick of a UMG Button get triggered - this works fine.

    The problem I'm having is after this initial fill, I'm trying to get the Progress Bar to start unfilling (or rather emptying) at an increased rate of 4% per tick and then fill again, sustaining the 4% per tick rate. I essentially want to the UMG Progress Bar to loop in both directions in a theoretical endless loop, until the player performs a second Click of the same UMG Button that triggered the initial fill.

    Both the Progress Bar looping feature and figuring out how to listen for the second Click of the same UMG button to stop the fill/empty loop I'm having trouble with.

    If anybody can help, I'd be greatly appreciative. I haven't been able to figure this one out yet and it's driving me mad lol

    Thanks in advance!

    #2
    I was able to get the looping progress bar after writing pseudocode for it in notepad...just had to take a step back and sleep it off. Going on 30 hours of being awake didn't help, haha. For those of you interested in how I got the looping progress bar portion, take a look at my blueprint attached. Next I gotta figure out the secondary OnClick for the button after the first click. Again, any help with that would be greatly appreciated!

    Power is linked to my UMG Progress Bar value, and I do the normal Power / 100 within a UMG function to get decimal value for the UMG Progress Bar (0.0 - 1.0).

    Click image for larger version

Name:	loop_progressbar.JPG
Views:	1
Size:	121.2 KB
ID:	1120386
    Last edited by Element808; 12-21-2016, 01:24 PM.

    Comment


      #3
      Figured it out. Ended up using an Enum to switch between states and have the state change occur in the UMG Event Graph every time the button is clicked.

      Comment

      Working...
      X