Download

ForLoop with delay after N amount of interactions?

So I’ve this BP about ForLoop with delay but now I need to apply delay after N amount of interactions instead that for each interaction.
I cant use that local variable because it starts from the first index that it is not 1, so do you have an idea please?

You have to pass in another variable ( the step on which to start applying delay ), and assign that to another local int variable.

1 Like

so basically, between Assign node and Delay node I have to apply another variable after N “Assign node”?

You’re passing in the parameter ‘delay time’, you can also pass in parameter ‘after N steps’.

it doesn’t work, still counting one by one

I’ve solved the problem with an external variable because the Macro doesn’t allow to reset an internal variable, is that correct?

This is the general idea ( not yet tested ):

Tested, it works…

1 Like

Yes man, this is basically what I’ve done. I was trying to find a way to reset the variable “DelayAfter” from inside the macro instead that from outside, but I see that is not possible

I don’t think so, no. But wouldn’t be a good idea anyway…

Just pass it as a reference:

That’s what I thought, but how come I don’t have that?

Screenshot_1

What version are you using?
Edit: I’m on version 4.20.

4.26.2

Ah, they got rid of it…

Must be coz macros are sort of global anyway

Makes sense I guess.

1 Like