Hi everyone, i'm trying to make a really simple game, my trouble is that my player has to choose beteween 2 paths, kinda Y interesection, but I need to let him overlap the choosen path for X seconds to the action to happend (follow spline) can someone show me how to set a timer? I've event already StartOverlap that change the color of the object and then get the path and EndOverlap that returns the old color, my timer has to be after change color, wait X seconds, check if it's still overlapping and then get the path. I hope u can understand me!
asked Feb 08 '19 at 01:47 AM in Blueprint Scripting
below is three examples of how this could be done. for your purposes i would try using method 2 since its simple and will work well with your current setup.
method 1 relies on a gate opening and closing depending on if the player is overlapping. basically we open the gate and start a countdown on begin overlap, then if the gate is still open after the delay your script is run.
method 2 relies on timers. the idea here is you start a timer on begin overlap, then if the timer is still valid by the time its meant to run then it runs if not nothing happens.
method 3 is sort of a brute force approach. on begin overlap we start a delay then when the delay is done we check to see if the player is still overlapping by checking it against every overlapping actor.
answered Feb 08 '19 at 02:59 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here