Timer by Function doesn't loop.

http://puu.sh/ler01/a46b3d779d.jpg

Can anyone tell me what I’m doing wrong? I can’t get the timer to work and I’ve tried many methods. I ended up making my own, but I really want to find out why doesn’t it keep looping. I mean the weird thing is that despite confirming that it does get executed, after that the TimerCheck functions return False and 0 respectively.

I would really appreciate if this is explained to me since it is kind of a mystery to me atm.

Edit: [Here’s a link][2] to the full jpg , I don’t know how to make the picture clickable.

What happens if you use Set Timer by Event?

I haven’t done that since I need to fire a function. Plus I just want to know why what I have done here doesn’t work. As already stated I have achieved my goal of having a function fired off every 1 second. I just want to know for future reference. I don’t think this is a bug because I failed to find a similar issue on the forums or in the hub.

Is it because you are not sending the other parameter to the function?

No that doesn’t have anything to do with it. The function works fine, it’s the timer that’s broken.

Currently it looks like your function isn’t actually doing anything. You should put any information that you want the timer to run into a custom event. Rename the custom event to the function name you set in your “Set Timer” node.

I figured it out. Apparently local variables get nulled after completion. So the Relative Object that I was plugging in was only stored locally for 1 iteration. Therefore after the first execution the variable was reset and the function didn’t have anything to work with.

Ripping the local variable out of the function, removing the input parameter and running via the timer worked.

Thanks.

The function was working only once through the execution pin when I hooked it up. But after that one run the timer still couldn’t run it.

Is there a way to tell UE4 not to reset local variables to default? I made the function under the assumption that it will keep the reference that was passed through the input parameter.

I have a similar problem though I pass a reference in a custom function as input and the timer does only one loop. Can anyone help?

I’m having the same issue but I’m not using local variables so that doesn’t stop it from happening. I’ve taken variables from a Hit Event and I’m firing an event in the Event Graph but it only fires once even though it’s set to loop.

to clarify: the variables are set after a Hit Event, I’m not just pulling straight from the Hit Event’s data.

Ok I figured it out: I was setting a variable on a Hit Event and somehow right after the first time it fired it was always hitting something else so it wasn’t sending off an Interface Message to the right BP. The timer is fine.