Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Timer by Function doesn't loop.

alt text 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 to the full jpg , I don't know how to make the picture clickable.

Product Version: UE 4.9
more ▼

asked Nov 08 '15 at 09:57 PM in Blueprint Scripting

avatar image

84 17 23 22

avatar image Jacky Nov 08 '15 at 10:57 PM

What happens if you use Set Timer by Event?

avatar image Kensei Nov 08 '15 at 11:01 PM

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.

avatar image yulaw2k Nov 09 '15 at 03:18 AM

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

avatar image Kensei Nov 09 '15 at 06:00 PM

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

avatar image Adam Davis STAFF Nov 09 '15 at 06:35 PM

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.

avatar image Kensei Nov 09 '15 at 08:11 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.


more ▼

answered Nov 09 '15 at 08:08 PM

avatar image

84 17 23 22

avatar image 0vr Nov 23 '17 at 06:29 AM

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.

avatar image 0vr Nov 23 '17 at 06:30 AM

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

avatar image 0vr Nov 23 '17 at 06:58 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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?

alt text

capture.png (189.6 kB)
more ▼

answered Aug 16 '16 at 02:06 PM

avatar image

3 2 6 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question