Move objects to another layout

For questions about using Classic.

Post » Tue Dec 07, 2010 10:06 pm

How can I move objects from one to another layout without changing their current private variables?
Thanks in advance.
B
2
G
2
Posts: 34
Reputation: 718

Post » Tue Dec 07, 2010 10:23 pm

You could use global variables ;)
B
30
S
6
G
5
Posts: 433
Reputation: 6,061

Post » Wed Dec 08, 2010 1:37 am

If the objects are global, they won't be destroyed when switching layouts. Or you could save all relevant info to an array, and recreate the objects.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Wed Dec 08, 2010 6:48 am

Global array, that is. Otherwise the array will get destroyed with layout change, too ;)
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Wed Dec 08, 2010 3:51 pm

Whoops, uh, yeah. Thanks for mentioning that, Mipey. :)
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Thu Dec 09, 2010 12:25 pm

Thanks a lot guys, I did it with global variables, but I still think there should be a ''move to layout' action' feature.
B
2
G
2
Posts: 34
Reputation: 718


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests