A behaviour that let you link an event sheet to an object

Im not sure if people have suggested this, so here goes :-

A behaviour that let you link an (external) event sheet specifically to an object. Whenever you have an instance of that object with the behaviour in it in a Scene, the event sheet that is linked to the object will always be included as a part of the Scene’s events, as long as the object exist that it.

This could be interesting to utilize, to be able to add certain sheet of events into a currently running scene by just adding an object the sheet is linked into. My use cases would be that I can include events for all scenes for a certain thing only related to an object.

For example I have a TileSprite object that is called TransitionTile, which is a global object. This feature will allow me to always include the events for the transitions effects that ill do with this object without going to every scene and linking the events manually, which can cause easy mistakes that took forever to fix.

I can also make a global Music Player, that plays background music nonstop that allow me to chanhe whenever i want, unless thats not possible yet, since i barely know most of GDevelop features

This can also be used for optimization, say i have bunch of enemies with the behaviour, linking an event sheet that manages enemies (the sheet is only linked once, regardless of how many instances with the behaviour) and i can get rid of those events when all enemies are destroyed, improving performance for big projects.

Hi, I am not sure if I fully understand your request, but you can attach specific behaviors to an object and if this object is global it will carry the attached behaviors to all the scenes.

You are probably familiar with the behaviors that are part of the engine and there is the option to download more extensions. If those extensions don’t offer the functionality you are looking for, you can also create your own behaviors/extensions Create custom behaviors | GDevelop.

1 Like

I understand such feature looks handy, but in the end doesn’t it replace only this? :

  • for each instance of “object“
    - link to external event

In your feature, where in the scene event sheet would be played the object event sheet? Beginning, end…?
With the small event I wrote above you can actually locate wherever you want in the event scene your object events.

So in my opinion it looks handy from the developer point of view, showing the object events as a separate sheet. But actually the current externals event allows to do this quite easily, and allowing us to choose where the external event is played.

But maybe I missed something, and never met the problem you encounter!

for playing music between scenes in the documentation

To touch on most of these, luckily everything you’re describing already exists in functionality within the engine, or wouldn’t solve what you’re looking for.

What you are describing here is the same as making a behavior in the engine. This allows you to make a custom event sheet that you attach to an object. Custom behaviors: create your own behaviors with events [GDevelop wiki]

An event sheet isn’t going to change anything about how music is played/started/stopped between scenes, this new function wouldn’t change that.

However, what you are describing here is already possible simply by toggling the scene setting to stop playing music between scenes as Planktonfun posts above.

Making the event sheet once and reusing it in multiple scenes is what external event sheets are for: External Events [GDevelop wiki]