[SOLVED] How to use External Events + Layouts?

Hi there!

I’m unable to really figure out how to use External Layouts and External Events. I created an External Layout with some objects, and External Events that should run at the start of the scene. I linked both to two Scenes, and they only seem to work on the initial Scene I linked them to. The second Scene doesn’t seem to have imported or linked the Layout or Events.

Any help would be appreciated.

I think you need to use the “Create objects from an external layout” action in the actual event list of every scene that need those objects, either on the begginning of the scene or with some other condition.

As for the external events, you need to add a “Link” event (You can do this with the “Choose and Add an Event” on the top right of GDevelop, to the right of the “Add Comment” icon) to the event list of the target scene, right where you want those events to happen(remember that event order matters a lot.)

At least that’s how I’m doing it.

1 Like

Hey Big-Matt, thanks for the quick response.

This is what my Event sheet looks like for the second scene I’m trying to work with:

“At the beginning of the scene: Create objects from the external layout named “L_Overlays””
“Include events from E_Overlays”

One tricky thing about these is you may need to add the objects used in the layout to all scenes that are linked if you haven’t already, otherwise they won’t display. You don’t have to put them on the scene, just make sure they’re available in the list. I wish it wasn’t like that as I feel like it clutters the object lists on scenes, but that’s usually the issue I run into.

The other possible problem could be that the scenes need to have layers that match what is used in your layout (i.e., gui, background, etc). As with the above, you don’t have to add the objects themselves to the layers within the scenes, the layer just has to exist.

I hope that makes sense!

1 Like

Thank you so much Phenomena!

The missing layers was the problem. Everything works now.

1 Like