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
41
S
11
G
4
Posts: 428
Reputation: 7,356

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
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

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
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

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
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

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
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

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
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Wed Oct 31, 2012 8:17 pm

thanks a lot
B
41
S
11
G
4
Posts: 428
Reputation: 7,356


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests