[SOLVED] Creating children

Hello again!
Some days ago I created a topic asking how to delete a child, and it worked very well (Thanks Slash),
but I think is better I create the children instead of removing them, so I don’t have to manually create like 100 children.
I think the principle is the same but it’s not working. In Debugger it’s creating the children ok, but the random number is repeating. It continues generating the random number even after creating my 10 children.

gd2

If you want to create a random new child each time you click, you need to check if child exist, instead of not exist.
And the change variable needs to be under the while loop not in it.

This?

Doesn’t work!

What does not work?
On click you will create a random child.
The reverse of what you had before.

If you want to create like 100 children at the start of the scene, that’s obviously different.

Then you want a repeat event and a counter variable.

I want to create a child each click. But the random is repeating the number. I have to click more than 10 times to create all children.

that doesnt make sense to me.
how often do you have to click?
edit:
i just tested it, and it does work

you ether have interfering events,
or you have already some variables in place beforehand. but then you have to click less, not more.
10 clicks = numero.1 to numero.10 all in place.

I have nothing but the print I post. No variables declared beforehand (Global, object or scene). And only one scene and one Event sheet. No extras.
If it was creating a different number each click, In 10 clicks I create all 10 children, correct?
How your code works and mine don’t.

yes, 10 click = 10 children.
had it run like 20 times, worked 100%
idk, maybe your empty events screw it up somehow.

Going to restart, and make it again.

It worked after restarting GD. Some glitch? Who knows?
Thanks again!