So for audio purposes, there’s already an extension called AudioByName, where you can set the audio file that you want to use -as a string-. This is SO incredibly helpful to be able to change the audio file dynamically!!
However, I desperately need the same for panel sprites. You can already set a new image on a panel sprite, but it has to be a predetermined set file. I REALLY need to be able to change its image dynamically using a string for the name, but literally can’t find a way to do so (I know of and have found some helpful examples of how to do so! But they’re all broken!! Not helpful!!!)
I’m still relatively new to GDevelop, and I’m the only person my company has who can code, so I’m the only person working on their giant dream project and so really don’t have the time to make this. Would someone be able to make an extension for this??
There is an extension that does this for regular sprite objects, but not panel sprites: Load Custom Image Extension for Gdevelop by Omega Slender I don’t know if you could use some kind of Javascript wizardry to replace the image in a panel sprite with that from a sprite object (or, it might be easier to try and change the code of the extension itself).
Alternatively, you can mimic the behavior of a panel sprite object using multiple separate sprite objects that are stretched separately but are pinned to each other (the Sticker behavior would help); but then you’d need to also store these images separately, which I imagine isn’t ideal.
Thanks for finding that extension! I’ll look at that and see if it’s able to do what I need it to. I really need a panel sprite (or regular sprite would be fine too honestly) to be able to dynamically change the image using a string for the name to an already-existing resource.
I did find out how to dynamically change the face of a 3D box using a string for the name via Javascript! It was actually a lot easier than I expected (seeing as how I’ve been wrestling with trying to change a panel image dyamically for aaaages).