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"

Loop doesn't work

alt text

Loop goes only one time. I want to know why...

Product Version: UE 4.21
Tags:
캡처.png (147.1 kB)
more ▼

asked Jan 02 '19 at 08:21 PM in Blueprint Scripting

avatar image

bokyeongisme
1 1

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

3 answers: sort voted first

Loop goes only one time. I want to know why...

It hits the Delay node, obviously.

Use a Timer instead if you want something to ping-pong or a Timeline if you want a smooth transition.

more ▼

answered Jan 02 '19 at 08:24 PM

avatar image

Everynone
15.2k 77 25 62

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

The way the Delay node works is this: when you launch the countdown, you can't call the Delay node again until it has finished the counting. If you call the same Delay node again while it's still counting, nothing happens.

In your case all 100 iterations occur within those 0.5 seconds, so yes, your Set Scale to 8.5 only works once. The Set Scale to 10 works 100 times, but you can't see that, because nothing actually changes. The way I see it from your BP, you can make an actual loop to make it work, like this: alt text

If you really need those 100 iterations and not continuous pulsing, you can add an Int variable and increment it at each iteration and check if it's == 100.

Or, as the esteemed @Everynone mentioned, use a Timer: alt text

The result will be the same. Just make sure that the Timer's Time is longer than the delay by some fractions of a second, for you to actually see the result.

loop.png (78.7 kB)
loop.png (86.1 kB)
more ▼

answered Jan 02 '19 at 09:22 PM

avatar image

Tuerer
1.8k 12 7 8

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

You can also follow this tutorial and actually create a "delayed" for loop. This one shows you how to modify the "for each loop" to have a delay but the principle is the same. I have attached a screen shot of the for loop with the modification you'd need to make. So instead of copying the for each loop macro into a custom macro, copy the for loop and hook everything up as you see below. Works just as you intended :)

https://youtu.be/zh8xx9abzZY

alt text

more ▼

answered Jan 03 '19 at 05:12 AM

avatar image

Nebula Games Inc
5.4k 28 9 15

(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