Hi does anyone have any ideas on how to use blueprints to create an old school golf hit power and accuracy bar?
I’m looking to have a power bar like older golf games like mario golf.
The player presses a button, the bar goes from 0 - 100 % power then goes back to 0% for power.
Then when they press the button a third time determines their accuracy.
below is an example of how this could be done using a multigate and some timlines. to initiate the movement of the system i use a left mouse input event. I set it to use the release of the button to stop the movement of the bars but you could disconnect that if you want to use a second click to stop. anyways the output of the multigate is determined by how many times the input has occured so the first click is out 0 the second is out 1 etc. this allows us to control many things from the same button. the next node i used here is a timeline which is how we will control the power value. as yo ucan see in the bottom right the timeline is a 0-1-0 value over 1 second and it is set to loop. this will allow the player a chance to time their click/release to set the power. speaking of setting the power, on update of the timeline we set a variable to store the power level. this variable will be of use later so you can modulate the power being used for the actual shot (base character strength * power = shotPower). after that all thats left is to update the progress bar on the UI, for this i got a reference to the widget containing the progress bars, then i got the progressbar component, and finally set percent.
now this is a super basic example of how this could be done and should be tweaked to your specific application (such as the time in the timeline). if you have any questions let me know. oh yea and i should note both the timelines are the same.