How to work with different Group Objects 1-by-1

How do I…

can do calculations and animations for every object of a group “one by one”?

What is the expected result

I want to animate every Value of my House one by one through some intervals. Like this House - 1 gold. This House - 2 golds. And do it while we have objects Houses exist. Lets say i have multiple instances of the object House. They are all belong to the group called Tiles. Every created instance of a House has a Value and Index. Index is like ID for every created House. So when i press button “Calculate” i want to calculate every Value of every house one by one and animate it with the number floating up.

What is the actual result

It works only for the first house. CurrentIncomeIndex changes to 2 and thats it.

Related screenshots

Project files (optional)

Answered in this thread.

tldr; remove the condition and action involving CurrentIncomeIndex. That variable serves no purpose in this event.

1 Like

Thank you very much, i removed it. But then every house showed animation simultaniously. But i want to animate them one by one. House with index 1, animation complete, Value showed, then House with index 2, animation complete, value showed.
“For each” doing this block for every single House in one frame, and i want to know how to do it one by one

I would do the following and use a tween to set the delay (BTW, you’re setting the IncomeText text to HouseTile.Value, when it should be Tiles.Value):

1 Like

Thank you man! I did that as you did in screenshot. But still it just makes one house do animation of floating text and showing its Value and thats it. As i understand “Repeat for each instance” is doing that at that very frame for all the instances of Tiles. So its tweening the Opacity with delay on ALL of them at the same time, then it adds +1 to DelayValue for every Tiles found so i can see that DelayValue at that very moment is instantly 5 (cause i have 5 houses). So im still figuring out a way how to process every group object one by one. Thank you in advance!

Yes. Because (and I’m assuming you have the code snippet under a parent event that fires off once) that last event is only processed once. You’ll have to move that last event out a level or two to the left, so the tween check is actioned all the time, and not just the once under the parent event.