How do I clone a single object in the Family?

Get help using Construct 2

Post » Tue Sep 20, 2016 1:33 pm

I have 3 singles sprites in a single family:
Sprite1,
Sprite2,
Sprite.

I want to click in a single sprite on the layout, example: i clicked in Sprite1. I want to clone him! I want to spawn another Sprite 1, but i clicked on the family... How do i spawn in a object? :?:

I did this:

Image

And it doest work! It's creating a random instance object of family... i want just create the object i have clicked!
B
14
S
6
G
2
Posts: 81
Reputation: 2,241

Post » Tue Sep 20, 2016 4:33 pm

If it's always clicking on Sprite 1 to spawn Sprite 1, then you use click on Sprite 1 spawn Sprite 1. If it's clicking on any Sprite in the family to spawn Sprite 1 then you can keep it as clicking on Family and then specifically spawn Sprite 1.

The inverted overlap is a good use of the family because you don't have to say is not overlapping Sprite1, is not overlapping Sprite 2. That's pretty much what the families are for, cutting down on redundant code.

Only pick the family when it can be any of the family. In your scenario above it has to be Sprite 1 so you've got to pick the individual object with the create action.
B
47
S
18
G
84
Posts: 2,271
Reputation: 49,796


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests