Hi everyone, first of all thanks to the Construct 3 team. It's an amazing product.
And thanks to the entire community for your valuable help !
Let me explain my challenge:
I have a Construct 3 array, initialized, named arrMainDeck
I have a file in my project "main.js" which I import for events.
Inside this js file I have a function parseHand that expects one parameter (array)
function parseHand(handArr) {
In my Event Sheet, I add a script to call the function like this:
const JS_arrDeck= runtime.objects.arrMainDeck.getFirstInstance();
runtime.globalVars.tempResult= parseHand(JS_arrDeck);
but for the life of me I can't manipulate the JS_arrDeck inside the js function. It doesn't seem to be a js native array , but a Construct 3 object instead..
Am I missing something , or do I need a plugin to manipulate and convert objects to js.
I have a workaround:
//const jsArray = [];
// loop the construct 3 array and push values with getAT
//jsArray.push(c3Array.getAt(x, y));
but this feels highly inneficient.
your help is appreciated.
thanks