Greetings! As the title say, i was wondering if there is any extension or natural support for regex in gdevelop.
Mi intention is that so that players can save their stats and such outside the game since i cant afford a database.
How it would work is that lets say the player inputted “Battle3,Magic1,Bows2”
Thanks to the specified pattern, the game would search for every word and number in between the ,(colons). Therefore, the game shall grab battle 3 and by eventing the game will then turn that into a battle variable equal to 3 for the player, same for magic 1 and bows 2.
If anyone knows if this could be possible i would highly appreciate the help!
Not for base variable names, no (not supported in JS either), but if you have a structure or array variable, you could probably use the regular expression extension as needed
All base variables have to already exist, no exceptions. Top line Variables have to be pre-declared. Child variables (structure children or array indexes) can be declared on the fly.
For data structures that are going to change frequently during runtime and may need to be saved or loaded, I generally recommend having a parent ‘gamedata’ structure variable and making all of the needed variables children, yes.