Update Suggestion: Object's Own Behaviors

When I’m creating a game my always problem is that when multiple objects with the same event creates, they didn’t do what they was supposed to do. Most of the time only one object did the events and the others were messed up. This is common when there are timers and changes that may occur to the object such as when changing transparency, forces, tint, technically everything. I know there’s a “For each object” and “Links” but it doesn’t work at all times. There’s also a “Create a function and behaviors” but it’s hard to understand.

My suggestion is that in the Objects tab, put an option were you can put there all the events that will happen to the object. So that every created objects have their own events and can’t affect other even if they were the same. Hope this will be implemented because this will help a lot to me and other game developers.

1 Like

Hi @FutureGameDeveloper. You said that “Create a function and behaviors” is hard to understand so here’s an intro to that from @tristanrhodes:

3 Likes

I suspect that would involve a wholesale change to the underlying structure of GDevelop.

And you’d be limiting it to objects you instantiate in the editor. How would you do it for objects created within the scene events?

Also, this could be achieved with an object variable, and setting the event condition that the variable has a particular value in order to action the sub events.


If it doesn’t work, then chances are the event logic is incorrect. GDevelop follows the events it is given. Incorrect events or event logic leads to unexpected behaviour

1 Like

With my little experience (because I’m beginner) my advice is: do separate tests for each action you want your objects to do. In these tests take care with “trigger once”.

In my example I fixed a bug of my game removing the “trigger once” and limiting the event with another condition:

With “trigger once” when one of my enemies “In_Larva_Gigante” changed the animation to “Explodindo_Tras” any other could’t change too even though it has “Valor 7”.

About timers look if you are using the “right timer” (object or scene). It’s make total difference.

With extensions I started choosing extensions already made and trying to redo them. When I couldn’t do it anymore, I tried to extract the logic from the extension already made. This started to make me understand how it works. I have three extensions in my game, but I keep improving them.

2 Likes

This is good advice. “TriggerOnce” doesn’t always work when it is inside a ForEach() loop, so setting an object variable or some condition that gets changed by the action will perform the same logic of “TriggerOnce”.

2 Likes

If you show a screenshot of your events, we can try to figure out what went wrong.

1 Like

I understand what you were saying. My only suggestion is to add the object’s own behavior but the event scene where not be removed or replaced. I just want it because is more easy to use if implemented than using the scene events. So that you didn’t need to use for each object, linking two objects to identify only the linked objects, and the custom behavior. Actually, my idea is almost the same in creating a custom behavior. But this is more straightforward because all the events is directly specified to the object itself.

Thanks for the advice! that’s why I suggested this because it’s so hard for me (I’m also a beginner) to create events that will work for same multiple objects. I can create events easily if the object will be created once in the game. But if I put multiple object with same events, that’s when the problem occurs. I always having a bad time in timers, linking, and other stuffs.

1 Like