Been having some fun using javascript but I am not sure what the best method is to pass an array I created in a script back to an array object in the Event Sheet.
Is there a way to directly set the size and the values using IArrayInstance? I read the below but I am not sure what the appropriate syntax is.
construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/array
I have already figured out how to pass information back to the event sheet using runtime.callfunction. Is this required to pass a string of the array back to be handled in the event sheet somehow to become an array?
Thanks in advance for any advice!
Solved my own problem...
Was getting the syntax mixed up.
I just looped through my array in java script calling the below and it worked.
runtime.objects."your array name here".getFirstInstance().setAt(val, x, y, z)
Develop games in your browser. Powerful, performant & highly capable.
Hey just wanted to say thanks for posting this.