Compare values of two instanced objects

  • How would I do this?

    For example, I have 10 instances of object A and 10 instances of object B. Both objects have the variable "Test" that changes frequently.

    How could I look through all 10 objectA.Test variables and compare them to all 10 objectB.Test variables to find a match?

    I was thinking nested ForEach loops but I'm new to Construct so I'm not exactly sure if that's possible or how to set that up.

    Thanks!

  • You can use System -> "Compare two values" nested in a for each loop, that might work for you.

  • try this

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hrmmm can't load it, says my version of Construct isn't new enough. Where do you get 104? I'm on 103.2, I'm using whatever was installed when I bought the software.

  • Nevermind, found it. :)

  • Looking at your example... duh it's so simple! I didn't realize you could do "sub-events" by right clicking the event and adding them in. Just my third day using the program. Haha... I was trying to just drag the other ForEach event under the first ForEach event and it was just putting them together as one event.

    Thanks!

  • glad to be of help

    yes you can drag one event under antoher and slightly move it to the right so it becomes sub-event of that above it...don't move contitions in events move entire event - couple of pixels on left edge of event that you wont to move

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