Widget Progress Bar Capture Point
Hi all -- I'm looking to create a blueprint that will display a widget/progress bar for capture point gameplay. I have not had much luck finding a tutorial specific to this. I've only been able to find tutorials related to health and/or stamina bars for the player. Could any of you point me to a more appropriate tutorial for this use case? Thank you!!
asked Sep 04 '15 at 10:24 PM in Blueprint Scripting
A picture of your setup would really help but heres what I would do
PlayerController or character class
Beginplay() -> Delay(1s) (To allow all widgets to be constructed) ->GetAllWidgetsOfClass(W_progressBar) -> Array.get(0) -> promote to variable 'progressBarWidget'
OnBeginOverlapWhatever() -> get W_ProgressBar -> Set bIsInTriggerbox = true OnEndOverlapWhatever() -> get W_ProgressBar -> Set bIsInTriggerbox = false
In widget W_progressBar
EventConstruct -> Cast to player -> promote to var (for future use)
EventTick() -> Branch(bIsInTriggerBox) -> True: float variable percent + 0.01 False: nothing (Better yet add a 2nd check if percent >= 1 then set bIsInTriggerBox = false
WidgetDesigner tab -> Bind progressBar percent filled to float variable percent
Best I can do without editor open but that will work I'm 100% sure.
Don't forget to accept an answer that best clears your question up or answers it so when the community finds your question in the future via search/google they know exactly what you did to fix it/get it going as well as keeping answerhub clean so that it gets removed from the "unanswered questions" catagory.
answered Sep 05 '15 at 01:11 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here