I'll preface this by saying that I'm a neophyte to Construct and I'm just now getting into JS insertion within the event sheet.
Within my game I have an Array object called "Solution". In my script I would like to make a copy of said array.
To understand it I would like to do this (written in normal JS):
let solution = [1, 2]
let solutionCopy = [...solution]
Giving a reading to the manual I tried to write some code, but it is reported in red, and therefore wrong:
let solutionCopy = [...runtime.objects.Solution]
Also subsequently, I can't access the length of an Array object, via JS code:
for(let i = 0; i < runtime.objects.TempRow.lenght; i += 0) {
I think I'm still unclear on how to properly access the data of an Array object via JS. Can anyone help me and give me some explanation?
Thanks