Game layer & sheet as an external module?

Get help using Construct 2

Post » Mon Nov 02, 2015 9:02 am

Hey folks, been using Construct for some time now and it's really great.

I'm developing a few games that use the same design and behavior for a hud/moves counter/score board etc.
The problem is every time I make a change in one of these layers or event sheets I have to copy-paste the changes
to the other games and it gets frustrating.

Is there a way in construct to treat these layers and event sheets as an external module, without having to develop a plugin
that would render them manually in canvas?

(hope this makes sense) :)

Thanks a bunch!
B
5
S
1
Posts: 10
Reputation: 295

Post » Mon Nov 02, 2015 9:15 am

I'm assuming you are already creating the HUD on a seperate layout and using it as global layer(s) and you have an event sheet dedicated solely to the Hud (Only interacting through variables and functions)..
Copying those shouldn't be too hard..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Nov 02, 2015 9:35 am

Hey, thanks,
It's not on a separate layout, it's in the game's layers.
I do have an event sheet dedicated to the hud.
Not sure what you mean about the global layer -
The hud is supposed to be inside the game layout - how do I import the "global" layer? Create an object?
B
5
S
1
Posts: 10
Reputation: 295

Post » Mon Nov 02, 2015 9:46 am

From the Manual

Global layers
Sometimes many layouts in a project have the same content on a particular layer, such as for interface or HUD overlaid on to the game. Changing this content then becomes a chore since changes must be repeated on every layout. Global layers are aimed at solving this problem.

If a layer's Global property is set to Yes, then every layer in the project with the same name is overridden by that layer. The initial objects, as well as its properties, are used instead of the other layer's own content and properties. Then changes can be made once to the original global layer, and the changes will be applied project-wide.

The layer with the Global property set to Yes is where all changes must be made from. On other layers in the project with the same name, the Global property will be read-only and display (yes, overridden) to indicate it is being substituted by a different layer. It will also not display in the layout view on other layouts, although its contents will appear when previewing the project.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Nov 02, 2015 10:05 am

Looks interesting, doesn't exactly solve my copy-paste problem but it's nice anyway. Thanks for the help!
B
5
S
1
Posts: 10
Reputation: 295


Return to How do I....?

Who is online

Users browsing this forum: dop2000, max2612 and 22 guests