How can I access to sprites from another layout?

Get help using Construct 2

Post » Wed Mar 11, 2015 9:36 pm

Hello there.

I would like if iis posible and how is posible to access to sprites from another diferent layout?
for example I have an sprite1 on Layout1, this sprite1 is global and belongs to a family1 , then I try to change its size property for example , from anoter layout=> layout2 using the function foreach(family1), but do not apper any sprite from thet family in layout 2, This is possible ? or How can I that?

thanks in advance!
B
14
S
4
G
2
Posts: 109
Reputation: 2,679

Post » Thu Mar 12, 2015 2:34 pm

A global object should automatically be created in the active layout.

Perhaps, Instead of trying to change it size ... try setting its location to somewhere within your viewport first :)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Thu Mar 12, 2015 7:59 pm

mmm so the active layout just only can access to the sprites which be within it..

I am afraid I would need to use some global variables or an array, would be great can to access to global sprites from a distinct layout.
B
14
S
4
G
2
Posts: 109
Reputation: 2,679

Post » Fri Mar 13, 2015 12:58 am

I use global sprites for settings.
I have some invisible 10x10 squares, set to global, in the main menu, which variables I can reference in any layout.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests