Problem cloning and destroying group clones

https://ready.app.link/rZVqlnEwZ8

@Ready
The circle makes a clone of group 1 every 3 seconds.
The group clones supposed to be destroyed when colliding with Rectangle 3 on screens left edge.
The circle only clones 1 of the 2 rectangles of group 1.
The group 1 clone doesn’t get destroyed when colliding with rectangle 3.
I tried changing solid on/off of Rectangle 3 and still didn’t work.
Please look and tell me what the problem is and if you can remix with a fix.
Cloning a group seems to be a big problem to start with.

4 Likes

Hey @Suzzy-Grey. I checked the project and have got what you wanted to do. And have added a score label to show how much time is taken. It is expected to go like 1—2---3—1---2—3 and so on.
https://ready.app.link/Wl02uX6CZ8

3 Likes

Thanks for the effort, but you haven’t succeeded in cloning GROUP 1 or having a clone of GROUP 1 get destroyed.
You have cloned 2 separate rectangle sprites and have them collide and get destoryed.

3 Likes

This was not working with the rectangles grouped, so I tried it the other way

3 Likes

Thanks again.
A group of sprites are invisibly connected together.
This is good for games, like having lots of sprites orbit a central point among other things.

3 Likes

Hi @Suzzy-Grey! I will try check this today!

3 Likes

Hi @Suzzy-Grey! The problem arises when you try to trigger two events on the same frame. When the first event is executed, the second begins to be executed after it on the next frame and does not have time to keep within the required period of time. (Every 3 seconds). Therefore, it is best to combine the two events into one. Deletion works the same way, so it is better to use position instead of collision, or to split objects into separate classes. Here is an example of events that solves your problem:

Link to the revised project: https://ready.app.link/cvbmBcFE18

3 Likes

Hey @Ready. When I tried to see what was wrong, I was also confused, that I had to add two invisible objects to clone each rectangle. And add a hidden line that makes the rectangle disappear, making it look like that the smaller rectangles have been destroyed by the bigger rectangle. :smile::smile:

2 Likes

I think it is better to set the triangles’ opacity = 0, so that it looks like that the circle is cloning the rectangles.

3 Likes

Yes, this is just an example to make it easy to find which rectangles are responsible for cloning.

4 Likes

Yes! Agreed! :+1::thumbsup:

3 Likes

Thanks for trying. You were unable to clone a group as well.

4 Likes

Hi @Suzzy-Grey! What do you mean? For your project i can see you try spawn two object in one time and this working well now or no?

4 Likes

I looked at your code, you clone 2 rectangles and not clone “GROUP 1”
Group 1 was made by tapping and dragging the chain icon from 1 rectangle to the other rectangle.
Your code achieved the desired result that should have happened when cloning Group 1.
This was just a simple test to see if i could clone a group for use in a proper game.
I see this can’t be done, so it doesn’t matter now.

4 Likes

Ahh, yes! You’re right! :+1: I created a ticket for this to fix this in future builds (Just couldn’t figure it out from your project, sorry about that) Thanks for the good catch :slightly_smiling_face: :metal:

4 Likes