Hey there!
For the last 5-6 hours I'm trying to solve my issue that I have.
It is a bit frustrating that the documentation in the scripting section is assuming that a programmer is reading it and not someone who might just be learning it. There is a lack of examples.
I try to get a JSON objects contents via script. I mean the Construct 3 event object JSON.
How can this be done?
My JSON object is called Language because it houses the localisation. I read this and tried everything.
runtime.objects.Language.getJsonDataCopy();
var lang = runtime.objects.Language;
var copy = lang.getJsonDataCopy();
console.log(copy);
return copy;
var lang = runtime.objects.Language;
var copy = getJsonDataCopy(lang);
console.log(copy);
return copy;
No matter what I try I always get getJsonDataCopy() is not a function. Doesn't matter if I use a script in the event system or if I call a function from the imported scripts.
Please, how can I read the JSON data that is stored in Language?