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"

Game crashes with "infinite loop" when repeating timeline

I am creating a Tetris like game and am currently working on the drop script. I have a timeline set up in a macro to move my piece down one slot inside of the class blueprint for my piece. Then in the level blueprint I calculate how many moves it needs to make then the macro loops (x) number of times. I am a long time programmer but knew to UE and game programming in general so this is the part that is confusing me. Even if I have it set to run the loop only three times it still says infinite loop found. After my research and hours of tutorial videos I have gathered that the loops must complete in between game ticks, not on a separate thread. Seeing as the timeline runs through many ticks I assume this is the problem. I have tried every way I can think of to rewrite the looping to no avail. Short of rewriting the animation sequences on the onTick event in the level blueprint and remove the timeline but I feel like there is a work around to repeat timelines. And thoughts, help hints would be greatly appreciated.

Product Version: UE 4.14
more ▼

asked Apr 08 '17 at 06:05 PM in Blueprint Scripting

avatar image

3 1 3 4

avatar image Wurmloch83 Apr 08 '17 at 06:40 PM


I know this is not really an answer to your problem, but I wanted to suggest to use a timer instead of a timeline when you need a recurringly fireing event. Using Timers in Blueprints

avatar image X4nd0R Apr 08 '17 at 06:58 PM

From what I'm seeing this is to have the function called on each tick for a set amount of time. While this is useful I'm not sure it will help in my situation in that it calls this function for a set time. I am looking to call the function a set number of times. I think I have found the solution it was the placement of the loop. After some playing to make sure I have it right I will post the answer.

Thank you for the tip though.

avatar image X4nd0R Apr 08 '17 at 08:39 PM

I apologize. I now see how the timers work and I think it would be helpful in a way but it seems to alter the distance that the object moves each time. I have asked a separate question in regards to this issue.

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

1 answer: sort voted first

In case this may help anyone in the future: I came up with the solution of adding a String called WaitingOn. While a piece is in motion WaitingOn is set to 'blit' (that's the name of my game piece). On EventTick, if WaitingOn is equal to 'blit' then I check that piece for a boolean that tells whether the piece has stopped or not. If it has, EventTick fires the timeline sequence again. The WaitingOn is also checked for 'newblit' to handle looping the creating and dropping pieces process. This does feel like a hack/work around and a very newbish approach so if some one has another way I would accept a something better.

more ▼

answered Apr 09 '17 at 03:10 AM

avatar image

3 1 3 4

(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