How do I copy behavior from one item to multiple items?

Get help using Construct 2

Post » Thu Mar 20, 2014 7:26 pm

I want to create a highscore screen when the player died.

this highscore is an image that contains more imagens, icons textbox and other things... i try to search containers before creating this thread but dont know if is correct.

The thing i want to do is when the highscore is showed all the other items "in" this highscore is showed too, if i want to move the highscore to the left all the items are moved at the same time too.

If this is already showed in other thread or tutorial sorry for duplicating.

Thanks for all and hope you guys can understand what i want to do.

Regards
B
31
S
13
G
6
Posts: 355
Reputation: 5,058

Post » Thu Mar 20, 2014 8:18 pm

Interesting... Maybe use a Family

You could have System pick all instances of the Family and preform the same action on all of them.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Thu Mar 20, 2014 8:59 pm

Yep, that's what Families are for. But seems like you're using the free version so you could use a layer where all these objects are, then you can show/hide the layer
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Thu Mar 20, 2014 11:22 pm

If she is using a free version isn't there also a limit on the number of layers?
If that's the case I guess you could use a global variable for an opacity level, and then have a group of code for setting the opacity based on the global variable.
She might also be able to pin all her high score elements to one of the elements by position. Then she could move the one element and the rest would move with it.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Thu Mar 20, 2014 11:50 pm

shirokuma wrote:She might also be able to pin all her high score elements to one of the elements by position. Then she could move the one element and the rest would move with it.

Pure genious!
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Fri Mar 21, 2014 1:50 am

Thanks guys for helping me.

Forget about the free version, im going to buy personal.

Which is the best practice? which is easier and consume less memory?

i think if i want to give movement to that highscore its better to do it with the family, because if i use the layer thing i can only show or hide, i think the family thing could give more things.

i didn't catch the last thing, the pin.

Thanks again for the help.
B
31
S
13
G
6
Posts: 355
Reputation: 5,058

Post » Fri Mar 21, 2014 2:18 am

Using a Family would probably be the way to go.

The Pin is a behavior. It will basically tie one object to another.

Here is an example. The red box has drag and drop on it so you can move it around. The blue box is pinned to the red box by position. So it will keep a relative position to the red box.
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
3
Posts: 172
Reputation: 1,933

Post » Fri Mar 21, 2014 7:17 pm

Thanks a lot.

Now im "VIP" im going to try the family thing and let you know how was it :)
B
31
S
13
G
6
Posts: 355
Reputation: 5,058

Post » Fri Mar 21, 2014 7:27 pm

katzin wrote:Thanks a lot.

Now im "VIP" im going to try the family thing and let you know how was it :)

Congrats!
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests