[SOLVED] Create Dynamic Objects

Hi all,

So I have carefully named all my objects such that it should be easy to create them dynamically. Basically, I have a character that converts foes into friends.

I have the following groups (families) and objects.

Group_Obj_Units_Blue

  • Obj_Unit_Blue_Avenger
  • Obj_Unit_Blue_Commander
  • Obj_Unit_Blue_Flanker

Group_Obj_Units_Grey

  • Obj_Unit_Grey_Avenger
  • Obj_Unit_Grey_Commander
  • Obj_Unit_Grey_Flanker

To make the create object dynamic, I tried to do both approaches:

  • Use SubStr
  • Use Partial Name approach
  • Put the Object Name in a variable and then try to reference that

None of these work :(. What am I doing wrong?

You should use this action:

Create an object from its name
Among the objects of the specified group, this action will create the object with the specified name.

Thank you so much and what I also like is that GDevelop knows that I am talking about the size of the newly created object if I put it in the proceeding lines :slight_smile:.