Delay between maps

Hi,
I think this could be a bug. If i have 2 maps and i started a delay in map1 and it ends in map1, i have no problem, but if i started a delay in map1 and delay time ends when my character is in map2 delay does not trigger end result.

Hi carf,

Instances are not preserved between levels for most actors. If you’re starting an execution chain in character blueprint in map1, for example, when map2 is entered a new instance of character is created and position on execution chain will return to beginning.

If you can tell us what you’re trying to do more specifically, we can maybe find an alternate solution for you.

Hope that helps!

Hi ,

My game is an endless runner(subway surfer style), when hero dies i put a button so user can save him, when user press that button, i call a function that put hero invencible(basically has a boolean variable, and changes color of hero) and after 5 seconds(delay) i call other function to put him normal.
If that happens(delay) between maps transition, funcion to put him normal does not execute.

Thanks for your help.

You’ll probably just need to make him “normal” again on Event Begin Play for each level.

If you need to keep remaining time, you can save that as a float variable and pass that to level on begin play, start a new delay with that float as time, and set back to normal after that delay has finished.

it is a solution, but can happend time hero will be invencible could be less than 5 seconds, depending where it starts. right?