x

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"

Delay breaks ForEachLoop

In this image, I have a ForEachLoop that fires functions that the actors in question posses. The ForEachLoop does correctly fire "Update Goal" and "Update Target" but once it hits the delay (which gives the actors time to rotate to face their target) it breaks and doesn't fire the last function.

Any idea why this is happening?

foreachloop

Product Version: UE 4.10
Tags:
g8azvqn.png (82.1 kB)
more ▼

asked Apr 29 '16 at 12:23 AM in Blueprint Scripting

avatar image

sarchasm
81 16 19 25

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

1 answer: sort voted first

A loop is meant to run all of it's cycles within a frame, adding the delay stops that from happening. Effectively breaking the loop. I'm surprised it doesn't crash when it hits that loop. What you could do is something like the below script.

Full Res: http://i.imgur.com/m5usDPH.jpg

alt text

This will run the cycle 5 times with a 0.2 second delay between them.

more ▼

answered Apr 29 '16 at 01:29 AM

avatar image

HaxO
713 23 15 45

avatar image sarchasm Apr 29 '16 at 01:48 AM

Thank you! I'll try this tonight!

avatar image Coderandrew Apr 21 '17 at 05:43 PM

You say this like it should be obvious. This looks like a bug to me. The design of the blueprint system seems to imply that this should work, and no where that I can find, other than this thread, mentions the inability to delay inside a for loop.

I don't mind bugs in an engine, but undocumented, secret and arbitrary "features" like this are extremely aggravating.

(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