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"

Why do my while loops crash the game?

I know why while loops will crash an application. What I don't get is why MY while loops crash the game, no matter how "correct" I set the condition. Here is an example. According to this blueprint, when I hold down the "]" key the loop is supposed to print "looping now" until I let go. The condition "dialboolup" is set to 1/true while the button is being held and is set to 0/false when released. This is the condition for the while loop to stop looping. Instead it just crashes the game without printing anything to the screen. I don't get it.

Product Version: Not Selected
more ▼

asked Jul 18 '14 at 01:10 AM in Blueprint Scripting

avatar image

173 33 60 80

avatar image Makotech222 Jul 18 '14 at 03:24 AM

That's funny, i get the same thing. using 4.2

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

1 answer: sort voted first

Unreal engine works on each frame basis, all events are checked on every frame, if you loop a thread it wont be able to finish the frame and locks up whole engine, as engine wont able to reach new button check routine so it wont able to escape that loop as code wont able to check if button got relesed. i know blueprint got loop limit so you can't lock up the engine, so it might be fail of it, but even with it you would have a problem.

Use delay nodes maybe, it will fork then thread and unlock rendering process where your loop will be in susspention until delay ends.

more ▼

answered Jul 18 '14 at 04:05 AM

avatar image

36.7k 932 169 1111

(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