Picking and comparing different objects & instances

Get help using Construct 2

Post » Thu Nov 06, 2014 9:18 pm

Is there a simple way in construct to compare across objects and instances?

Say I have 3 different objects with multiple instances of each. So 10 instances of objA, 10 of objB and 10 of objC

For each object and their instances i want to pick the one that has the highest instance variable "posY" so check 3 different objects and 30 instances. (this bit is ok)

Then I want to take the 3 that are picked from the above and compare those to give me the object type and the instance that has the highest instance variable "posY"

Is there a simple way in construct to compare across objects and instances this way?
Some games: https://play.google.com/store/search?q= ... s&hl=en_GB Feel free to show the panda some support, he would appreciate it :)
B
19
S
5
G
1
Posts: 155
Reputation: 1,619

Post » Thu Nov 06, 2014 10:54 pm

There are some great tutorials from Kyatrick about picking on YouTube.
Look for scirravideos.
Image
B
54
S
24
G
12
Posts: 96
Reputation: 10,326

Post » Thu Nov 06, 2014 11:22 pm

There is a built in expression to pick by highest/lowest instance variable (I assume you have that as you say 'this bit is ok'). Then just add your next expression after the first. Picking is based on filtering instances in each expression, so what you're asking is just what C2 does normally, if I've understood you.

edit: you'll need to put the 3 object types in a Family and put the instance variable on the Family.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Fri Nov 07, 2014 10:22 am

Thanks for the tip :)
Some games: https://play.google.com/store/search?q= ... s&hl=en_GB Feel free to show the panda some support, he would appreciate it :)
B
19
S
5
G
1
Posts: 155
Reputation: 1,619


Return to How do I....?

Who is online

Users browsing this forum: dop2000, Kyatric and 33 guests