Object Groups containing Text Objects no longer selectable for Shadow Events if made Global

Hey All,

I ran into an issue that I was able to reproduce even in test projects. Whenever I have text objects in a group in a single scene, I can target the whole group with the “Show the Shadow of: textobject”.

However, it breaks if you add other scene objects to that global group.

Steps to reproduce:

  1. Create a scene.
  2. Create 2 text objects.
  3. Create an object group.
  4. Add text objects to object group.
  5. Create event to turn on the shadow for that object group.
  6. Test scene. Shadows work.
  7. Make object group global.
  8. Test scene. Shadows work.
  9. Create a new scene.
  10. Create a new text object.
  11. Add new text object to object group.
  12. Go back to first scene.
  13. Test scene. Shadows no longer work.
  14. If you try to edit your event, the object group is no longer selectable.

Let me know if I’m missing something on this. This is also true for other text events like Change Color, as well.

Issue confirmed here.
Note that if the text object of scene #2 is made global, the shadow event works again for scene #1.
So it looks like for global groups to function properly, all objects belonging to the group need to be globalized too. Not sure if that’s meant to be.
Test project (link valid for a week)

This is not a problem with text, it’s global group.
I use the sample project from @Gruk.
In second scene Group is global (italic and bold) but if you go in eventsheet Group is not available as parameter.

So this global Group seem not exist for this second scene.
If you create a new group called group2 and object in and set both as global, then you can select it as parameter. But Group is not yet in list.

Second scene seem not connected with global things… @4ian

Both scenes have same events.

JS code generated from scene 1, all is OK

Second scene :

This is because in the second scene, some objects are not existing (one, two), so the group is considered by GDevelop as having unknown objects, so GDevelop can confidently say “this is a group of Text objects”. So instead it’s considering it as a group of “generic objects”:

We might want to modify the behavior to ignore non existing objects when deducing what is the object type represented by a group.


Or maybe a way for the user to just select it?

Some sort of “type of group” toggle?

For user who want take a look, issue is somewhere after this line 438.

I don’t will make this change. I’am not comfortable with C++ :grimacing:

1 Like

I’m wondering… is it logical/useful/practical to have global groups containing non-global objects?

If I make a group global, I would expect its members to be made global too. That would be the convenient thing about it, not having to make global each individual member.

1 Like

Having a global group but non global members seems useful to me for event purposes. The original reason I found out about thus is because I have an external event sheet that contains at least 30 events all targetting this group.

I have one scene with 2 text objects that apply, another with 20, and another with about 5. Having this work saves me a ton of event rework, or having to remake a group for each scene. Requiring the objects to be global would mean I would have to hav 27 extra global objects show up on tons of scenes that don’t need them, in a objectlist that already is a bit of a mess to navigate.

1 Like

So, you’re using the global text group to apply style changes easily to all of your game text? In this context, it makes sense.
I was thinking about my onscreen controls, language buttons and other global graphical elements, and didn’t find a good use case. Thanks :+1:

Yep, style changes, event handling (positioning, “If member of group is selected and player presses this key, do this”, etc).

Creating a new group with the same name in every needed scene isn’t the end of the world, but it would seem like using a global group is made for this type of thing.

Nothing like spending over an hour debugging why my text hover color is not showing up thinking somewhere up my long chain of menu events (because the headache of adding gamepad support tripled the amount of events) I messed something up because I remember it working before only for it to be because I added a non global object to a global group. Thanks for the info thread.