How do I use same button on different layouts

Get help using Construct 2

Post » Wed Apr 01, 2015 2:25 am

In game,I have 2 layouts,and 1 button will appear on both of them.On both layouts,this button have same functions,so i can create a button for two layouts?(or clone,or copy,by anyway....)?
B
6
Posts: 31
Reputation: 312

Post » Wed Apr 01, 2015 2:42 am

@astrung, If you want the same button to exist in two layouts, can't you just make it a GLOBAL object? (a parameter you can set below UID)
B
61
S
13
G
1
Posts: 151
Reputation: 4,624

Post » Wed Apr 01, 2015 2:43 am

I have been dragging and dropping the button from the Object types.

When it is selected on the Layout you can also get the position coordinates so you can match them between layouts.

Assuming you on a PC. Within the Event sheet you can highlight multiple Events and Actions, right-click, copy (keyboard shortcut Ctrl+c). Then go into the Event sheet for the new Layout and right-click, paste (keyboard shortcut Ctrl+v). It took me a little trial and error to figure out exactly how to select a whole row. To select a series of rows click the top row of the series, hold shift on the keyboard, then click the bottom row of the series. Similarly you can click a row, hold Ctrl on the keyboard, then click another row in another area.

I hope this helps.

You can also perform this action between projects as long as the Objects or Plugins within the actions/events are included in the target project.
B
6
S
1
Posts: 30
Reputation: 412

Post » Wed Apr 01, 2015 2:53 am

Even this button is a global object,but how to we can drag(with CTRL) from a layout to other layout??(to make a copy of object)?
B
6
Posts: 31
Reputation: 312

Post » Wed Apr 01, 2015 3:00 am

Lets say you have Layout1 with the button you want to copy. Create Layout2.

Then with Layout2 on the screen select the button from the Object list in your Project and drag over on top of Layout2.

Is that what you are trying to do?
B
6
S
1
Posts: 30
Reputation: 412

Post » Wed Apr 01, 2015 3:09 pm

But even a global button,if it appears in 2 layouts,we need to put 2 same codes in 2 layouts?In my game,if i have a code for a button in a layout,if i only copy and paste this button ,this button will not do any thing in other layout.(i have set a global button)
B
6
Posts: 31
Reputation: 312

Post » Thu Apr 02, 2015 2:11 pm

Hey,anyone can explain for me?
B
6
Posts: 31
Reputation: 312


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], Pulstar, SeuLuis, Yahoo [Bot] and 3 guests