moving and copying event sheets

Discussion and feedback on Construct 2

Post » Mon Mar 05, 2012 1:30 pm

Hello peoples,
in Construct 2 you cannot move or copy and paste a event sheet. Can I not do this? Or is there a setting I can change?

- Thanks
B
13
S
2
G
4
Posts: 54
Reputation: 3,882

Post » Mon Mar 05, 2012 9:46 pm

You can right click on the event editor and pick "Include Event Sheet" and choose the one you want from the list. And I am not sure about this one, but I think you can also set the event sheet that the layout uses by going into the layout's properties and pick it from the drop down list.VampyricalCurse2012-03-05 21:47:59
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Mon Mar 05, 2012 11:48 pm

You can copy and paste between two existing event sheets but keep two things in mind:
1) Minor, but there must be something in the target event sheet because you have to right click on that something in order to be able to access the paste option. EDIT: Sorry. My mistake. You can paste into an empty event sheet if you use the paste option on the tool bar.

2) Much more serious, if you copy and paste global variables between two event sheets in the same project, the variables created in the target event sheet will be renamed (for example, globalvariable becomes globalvariable2. Here's the problem. If you then go back and delete the original variables, you'll delete all of the events and actions that reference those variables! This is a side effect of the work Construct 2 does to keep your game always runnable.

To get around that you can save the game as a project, and then replace the event sheet (which are XML files) with the desired event sheet.

It goes without saying that you should make a backup copy before you do this!kittiewan2012-03-06 00:01:16
B
29
S
11
G
12
Posts: 281
Reputation: 11,868

Post » Tue Mar 06, 2012 12:59 am

@kittiewan: You shouldn't have to copy global variables, global variables are reachable through event sheets.
If you copy events accessing a global variable from event sheet 1 to event sheet 2, things work.
You could even have an even sheet with all your global variables, and still those variables would be reachable from any event sheet in the project.

I really don't recommand the xml road there as if you need to copy a lot of events, you're probably doing something wrong and would have more power and elegance out of an include.Kyatric2012-03-06 01:00:18
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: 6,998
Reputation: 57,791

Post » Tue Mar 06, 2012 3:02 pm

Unfortunately, just because you shouldn't NEED to do something doesn't mean you won't! (I speak from unfortunate experience here!)

I should have made it clear in my previous post that Cut and Paste will work to move items, including global variables, from one sheet to another. Copy and Paste is where the danger lurks.

If you copy and paste, rather than cut and paste global variables, and then make the mistake of deleting the original globals, you'll essentially trash any events that used those original global variables.

Many people tend to avoid Cut and Paste, considering it more dangerous than Copy and Paste followed by delete, but in this case the reverse is true.

I've reported as a bug that you can delete global variables without any warning that the conditions, actions and expressions that reference it will also be deleted. EDIT: Ashley says this will be fixed in the next build.kittiewan2012-03-06 23:07:35
B
29
S
11
G
12
Posts: 281
Reputation: 11,868


Return to Construct 2 General

Who is online

Users browsing this forum: totoe and 6 guests