#Lemme show you what you would want to do
1 messages · Page 1 of 1 (latest)
@paper elk I'll post images and info here. Please study it and try it all out and try to understand it. I won't have the time to follow up on this.
I created two Blueprints.
- BP_OverlappedTimer
- Actor with a Box Collision.
- WB_OverlappedTimer
- UserWidget with a TextBlock.
The BP_PlayerCharacter you'll spot in the Cast node is assumed to already exist on your end.
I will definitely try it out
BP_OverlappedTimer
Variables
- TimerHandle_Timer - Type: TimerHandle
- Milliseconds - Type: Integer
- TimerWidget - Type: WB_OverlappedTimer (Object Reference)
- TimerIntervalMS - Type: Integer
Functions
- OnComponentBeginOverap (Box)
- OnComponentEndOverlap (Box)
- OnTimer
WB_OverlappedTimer
Variables
- TB_Timer - Type: TextBlock (Added via Designer)
- OverlappedTimerActor - Type: BP_OverlappedTimer (Object Reference)
- Note: This variable is set to "Instance Editable" and "Expose on Spawn" to show up on the CreateWidget node. If you have this but don't see the pin, compile the Widget BP and refresh the CreateWidget node.
Functions
- EventConstruct
- Event Destruct
- OnTimerUpdated
Disclaimer: I have not tested this. It might be that I did a tiny mistake somewhere. Overall, this might be a bit more advanced than what you asked for, but I believe that things should be learned the "correct" way early on and a Timer is simple enough to go a bit funky with.
Enjoy.
Omg your game looks so good
:P Thanks.