I started learning visual scripting and Unreal about two months ago, and I am currently trying to apply some of the things I studied into my own first little project.
Right now, I am coding a simple timeloop mechanic in my FPS project. Currently, my character gets teleported back to its original location after my countdown is down to 0. It’s working well which I am super excited about.
To push things further, I wanted to add various actors in the level that can affect the countdown when being overlapped by players (E.g. Items that increase or decrease the remaining time of the countdown), but I struggle figuring out how to have any new BP Actor communicate with my BP_TimeLoop to update the countdown.
I tried to play around with the Get Timer elapsed time nod, trying to make it a function that would be called in my new BP_Actor but with no success.
Below is my TimeLoop blueprint for reference.
Could anyone help me figure out how to have a BP Actor in the level communicate with my countdown to update the countdown time seamlessly?
Yep, tho there’s a workaround by using a float variable with a looping timer which you most likely knew but wanned to recommend a more practical approach over it. Still I wanned to share my approach since I already prepared it (had some issues with Microsoft login and still couldn’t fix it after an hour that’s why I couldn’t edit out the first unnecessary seconds in my vid below)
I went with your option so far, BlockworkOcean, and was able to reset my timeline value to any desired valued when interacting with the other BP, which is great.
For now, the Actor BP only sets a new countdown value to my timeline.
Is there a way to make it more of an increment function? For example, everytime I interact with a BP actor, it adds +5 seconds to the timeline seamlessly, meaning it can all add up?
I had tried the following but obviously, this is where my beginners’ knowledge has its limits, haha.