"Get Timer Elapsed" Returning -1.0 Always

Hello!

I just need a little help on something I don’t understand.

I need to use a timer to make a change in an event. So that if the Elapsed time of a Timer is less than 1 second, A will happen, if more B will.

Though I am stuck at the very first step. I am not able to get elapsed time. Here is my simple script;

For testing purposes, I trigger this event every 0.3 seconds, and it works! But Elapsed Time always gives -1.0.

What am I doing wrong? Thanks for any help. :slight_smile:

Hi ,

You need to pass in the object to grab the delegate from. If you check your log, you’ll probably see an error message about bad function or object specified. Your function looks fine, but without an object the internal code is going to fail.

Ow. I knew I supposed to do something with that. But if you excuse me, what should I chose in that object type? At the moment this is all going in Player Controller BP. So should I chose that? I am not at home right now so I can’t check, so was wondering that’s true. Thanks again!

If this is the player controller BP, then I would imagine you would pass in the player controller as the object. If you select the drop down you should get a list of possible choices. Where ever that delegate is coming from is where you want.

Cheers friend, I will mark this resolved whenever I can test it out. :slight_smile:

Got it working. Thanks.

Hi , can you please share the screenshot of the solution. I tried by above explanation but every time i print “Elpased time value” it shows 0.
I didn’t get the incremented value. Thanx a ton for the answer.