Learn JavaScript in Construct, part 11: Construct APIs

You're viewing a single comment in a conversation. View all the comments
  • 1 Comments

  • Order by
  • Just in case this is still relevant (for anyone with the same question): check out the fairly new example titled "Generator Function" for one way; but using generator functions is not required, you can just do that too:

    for (const inst of runtime.objects.SomeObjectType.instances())

    {

    if (inst.instVars.SomeInstanceVariable === 42) {...}

    }