Compare values of two instanced objects

Get help using Construct 2

Post » Tue Oct 02, 2012 11:14 pm

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!
B
7
S
2
G
3
Posts: 28
Reputation: 2,260

Post » Wed Oct 03, 2012 12:36 am

You can use System -> "Compare two values" nested in a for each loop, that might work for you.
B
16
S
7
G
4
Posts: 29
Reputation: 4,957

Post » Wed Oct 03, 2012 12:43 am

try this
B
12
S
2
G
2
Posts: 96
Reputation: 1,583

Post » Wed Oct 03, 2012 5:45 pm

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.
B
7
S
2
G
3
Posts: 28
Reputation: 2,260

Post » Wed Oct 03, 2012 6:24 pm

Nevermind, found it. :)
B
7
S
2
G
3
Posts: 28
Reputation: 2,260

Post » Wed Oct 03, 2012 9:52 pm

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!
B
7
S
2
G
3
Posts: 28
Reputation: 2,260

Post » Wed Oct 03, 2012 11:03 pm

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
B
12
S
2
G
2
Posts: 96
Reputation: 1,583


Return to How do I....?

Who is online

Users browsing this forum: LeFuji and 26 guests