Hello, I'm new to javascript with Construct 3 so I just want to make sure if I get this right.
I have one sprite object in my Layout and its called Enemy. On simple button click here is my code
const inst = runtime.objects.Enemy.getAllInstances();
console.log(inst);
for(var i = 0; i < inst.length; i++)
{
inst[i].x += 10;
}
Is this how it is intended to be used if I wanna move all instances of this object or is there a shorter way to do it?
Thank you!