Compare random objects with different Instance Variable

Get help using Construct 2

Post » Thu Oct 16, 2014 4:46 pm

Hello, i have some objects, for example 4, every object have a different instance variables, and two of these appear in the layout randomly.

Please I need to compare when you click on one of the two objects in the layout with the other object in the layout. Thanks for the help.
Image
B
38
S
10
G
2
Posts: 66
Reputation: 2,823

Post » Thu Oct 23, 2014 5:41 am

what do you want to achieve?, do you have 4 instances of the same object or 4 different objects?, don't get confused, they mean 2 different things?
Image
B
58
S
13
G
6
Posts: 271
Reputation: 12,128

Post » Mon Oct 27, 2014 6:02 pm

danuyos wrote:what do you want to achieve?, do you have 4 instances of the same object or 4 different objects?, don't get confused, they mean 2 different things?

I have 4 different objects , each with its own instance variable
Image
B
38
S
10
G
2
Posts: 66
Reputation: 2,823

Post » Sun Nov 02, 2014 4:55 pm

if you have a license you can try placing the 4 objects into a family, and compare (I don't know what) the clicked object with the family.

If you don't, try using 2 global variables.. set them when the objects appear/are created, one per object.

Since I don't know what you are trying to compare, or what to do next I can't give you a practical answer...

You can also use the "pick all"condition and referece the 4 objects, then check the variable
Image
B
58
S
13
G
6
Posts: 271
Reputation: 12,128

Post » Mon Nov 03, 2014 9:05 pm

Ok, to make this easier, i'm going to explain my game. This is a kids game, every object has a draw with a number 1,2,3,4,5... Two of these objects spawn randomly and the kid need to choose the higher number. How can i do that?
Image
B
38
S
10
G
2
Posts: 66
Reputation: 2,823


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests