Been trying to load a json file inside assets randomly using RNG, Via a list of files stored in a variable.
File should be loaded perfectly but been getting error and does not even try to find the file
First trying a methods from a old forum post
Also attempt to make a js plugin but failed
And current available JSON file does not support values from a array.
If anyone have any idea please let me know ASAP.
Does it work with a fixed filename in quotes?
Arrays start at 0, so when you generate a random number, you need to subract 1 from the child count or it will eventually go above the existing elements by 1. Gdevelop would create a new element with the default value. In this case an empty string. Everytime it did that it would grow the array by 1 making it less likely to pick a valid value.
VariableString(name[Random(VariableChildCount(name)-1)])