How to customize existing extension

Hello, first time posting here, been using GDevelop about 3-4 weeks.

I have a Scene Group that has (at the moment) two different Tiled Sprites. I would like to randomize which of the Sprites is picked from the Group (and also modify the width of the picked sprite).

Instead of the regular Create Object action I managed to use the Pick a Random one, like this…

This seems to work fine, but when I try to modify the width of these platforms on the Action line(s) after that (either individually or by Group), weird things started happening, so I disabled them… What is weird about these methods:
(A) The platforms/Sprites will randomly change width several frames after creation, and
(B) After a few seconds, only one type of platform ends up being created.

Instead of creating multiple “external” event parameters to randomize these things, I’d like to create a custom expression (based on the Create Object action) to handle all of that (or as much of it as I can) at once.

I have a very basic understanding of how the Extension Editor works, and GDevelop documentation & YT videos have helped but only a little bit.

For starters, I managed to edit an non-default installed expression, and that helped me understand the Extension Editor a little bit more.

I’d like to edit (if I can) a copy of the existing Create Object action, but I can’t seem to figure out how. The only options I can find at the moment are to install (and edit) new extensions, or to start from scratch.

Step-by-step directions would be much appreciated. I feel like I’m missing something that should be obvious.
At the very least I’d like to be able to see how the Create Object extension works in the editor. Maybe then I’d be able to make my own from scratch.

Unfortunately, Most (if not all) of the native event conditions and actions are actually interpretations of raw code and not built from other event actions/conditions, like most of the extensions are.

The only way you could edit that actual event would be to modify the engine source code, available here: GitHub - 4ian/GDevelop: 🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.

1 Like

Thank you for clarifying.

Any advice on how to become more familiar with the Extension Editor?

Well, mystery solved, I guess the answer is… No hehehe :D:
Still, if it helps anyone, I managed to make things work with what’s available, like this


Ended up changing the names of the sprites in the group to Box1 and Box2,
then used the ToString(Random()) to pick a name from the group after Among Objects, slapped a Change width action afterwards, and bam! a whole lot-a randomness! hehe

If anyone has a similar technique, feel free to share!
;D

1 Like