Can I move a GLOBAL?

Discussion and feedback on Construct 2

Post » Wed Oct 31, 2012 5:37 am

How can I move a GLOBAL variable to another Layout?
B
43
S
11
G
4
Posts: 428
Reputation: 7,454

Post » Wed Oct 31, 2012 6:00 am

Cut/Paste.

On the cut, the events linked to the var will disappear, but they'll reappear as soon as you paste in the destination events sheet.Kyatric2012-10-31 06:00:44
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Wed Oct 31, 2012 2:08 pm

From the manual entry on Event Variables:

[quote]Global variables can be moved to another event sheet by cutting and pasting them. After being cut, references to the global variable will disappear because it has been removed; this is normal and nothing to worry about. When you paste the global variable, the references that disappeared will reappear again.[/quote]

Note: global variables are on an event sheet, not a layout.Ashley2012-10-31 14:09:28
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,228

Post » Wed Oct 31, 2012 5:26 pm

@Ashley - what about having copying and pasting them work as well, so when you paste the previous global is deleted, and the removing/reappearing of code part doesn't have to happen? It's a little nerve-wracking to have the code relating to it disappear.Arima2012-10-31 17:27:25
Moderator
B
93
S
33
G
33
Posts: 3,006
Reputation: 27,719

Post » Wed Oct 31, 2012 5:36 pm

@Arima - copying and pasting doesn't really work with moving, it's a bit surprising if you copy and paste and the original is deleted. Also it could break the existing copy and paste, which is useful to duplicate a variable of the same type but with a different name.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,228

Post » Wed Oct 31, 2012 5:45 pm

Yeah, I guess I was thinking a popup could appear explaining that the original had been deleted, but you're right about duplicating them, I hadn't thought of that. I guess it is better the way it is.
Moderator
B
93
S
33
G
33
Posts: 3,006
Reputation: 27,719

Post » Wed Oct 31, 2012 8:17 pm

thanks a lot
B
43
S
11
G
4
Posts: 428
Reputation: 7,454


Return to Construct 2 General

Who is online

Users browsing this forum: jakezinis, Yahoo [Bot] and 6 guests