How do I iterate over sprites with a certain instance variable value?

0 favourites
  • 2 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hi, I'm having a bit of a hard time and would appreciate some help. I have a grid of sprites with each one having a row value, a column value, and a type value. If the type is the same all throughout a row/column I want to toggle a global match bool and set a variable to tell me where the match occurred. I'm not overly familiar with construct and I'm not sure of how to do a "pick all where ___" type deal.

    In short, I want to pick a certain row/column and then compare the type value of each to see if the match. Something like if sprite 1,1 type = sprite 1,2 type match++ and if max equals the number of rows we have everything in the column matching.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just keep adding whatever conditions to narrow it down.

    For each Sprite

    If row = ?

    If col = ?

    Is bool set

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