How do I Compare Two Objects with value number

Get help using Construct 2

Post » Thu Oct 09, 2014 4:39 pm

Hello, i need help to set a value to a two different objects a then compare. For example set a "100" value number to object 1 and "50" to object 2. Then you need to choose one of the objects, if you choose object 1 you win because 100>50 but if you choose object 2 you loose 50<100. How can i do it? Thanks for all.
Image
B
37
S
10
G
2
Posts: 66
Reputation: 2,798

Post » Fri Oct 10, 2014 3:48 am

did you try "compare two values" ?
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
63
S
14
G
2
Posts: 291
Reputation: 6,641

Post » Fri Oct 10, 2014 5:33 am

Yes, but i don't know how to compare the two objects instance variable with "compare two values"
Image
B
37
S
10
G
2
Posts: 66
Reputation: 2,798

Post » Fri Oct 10, 2014 11:13 am

[your_object_name].instance variable
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
63
S
14
G
2
Posts: 291
Reputation: 6,641

Post » Sat Oct 11, 2014 1:59 pm

Thanks, you was right. Other thing, how can i compare the objects if there are random? Example: You have 4 objects, RED with instance value 10, blue with instance value 5, green with instance value 20 and yellow with instance value 22. Two of these objects appear randomly, how can i do to compare them? Thanks for all.
Image
B
37
S
10
G
2
Posts: 66
Reputation: 2,798


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 4 guests