How to use external events?

I tried but its not working…

First create a new external event from the Project manager, and add some events in this external event.
Now, in the scene events, add a “Link” event and put your external event name where this link event asks for it.
The link event is like a placeholder, GD will copy the external event code and paste it instead the link event when exporting the game. The adventage is that you can link to the same external event in multiple scenes and multiple times in the same scene too, and you have to modify the external event just once to update the code to every place it’s called from :slight_smile:

1 Like

Thanks for the info! But i reliased that when i separate it into external events for all of my codes. The game doesn’t seem to run as smooth as before. Any tricks to optimize it?

As I said, I have readed out there that the external event code is copied at compile time, so it’s exactly the same if you separate the scene events in external events, then it couldn’t be the reason for the performance drop.
Maybe you are running an external event more times than needed, the Link event can be placed as sub-event too, so you can perfectly recreate the original scene code with external events :slight_smile:
Do a copy of your project, and move the external events to the scene code (removing every link event), check if the performance is better, if so we have a problem :neutral_face:

i can’t find the “Link” action/condition in the latest version

In version 5, you link an external event by selecting this;

image

2 Likes