Im trying to make a widget with a progress bar that goes up when there are no lights nearby, so i made a blueprint for my lights with a sphere collision which sets a boolean to true when the character enters, im not sure what to do next, anyone who can walk me through?
Hey @ADrn234
so your progress bar will be showing your in-/sanity level.
For this to work you will need
- a float called Sanity or Instanity (depending on what should be showed)
- a timer
- an event which changes your In-/Sanity value
This timer will loop this event the whole time and decrease your sanity.
Now, when you enter the sphere collision you change a boolean inside your character so that the event now increases your sanity and when you leave sphere collision your sanity decreases again.
You can do this by using OnComponentBeginOverlap and OnComponentEndOverlap.
E.g.:
Your light blueprint
Your character
1 Like
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.