Python and containers

This forum is currently in read-only mode.
  • Is there any way to go through all of the objects of a given container?

    I did it with nested for loops and some variables, but if there is lots of objects it's slows down as hell of course.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well, I found a workaround for this, it's still not quick enough, but way better than my original solution.

    If someone is intrested in this in the future...

    When you loop through an object's instances in the event editor, it's picking the other objects in the same container, so this way it works.

    + System: For each a

    SOL.b.x = SOL.a.X

    SOL.c.x = SOL.a.X


    I tried this with 15 object, if I only use events it's running , this way 900-1200fps, and in pure python I got only 200-220fps(ouch).

    Note: these values can be a lot higher(I've got the same fps with the mixed solution when I only checked them every 20-30ticks) if you not loop through all of them every thick, but that is only in option if you don't use vsync of course.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)