What is the difference between Pick and Compare?

Get help using Construct 2

Post » Wed Sep 28, 2016 3:32 pm

Image
They seem to behave similarly but not exactly.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Wed Sep 28, 2016 4:06 pm

Think they are the same, put that way.

Pick by comparison is just more flexible. By instance :
Expression = sprite.platform.VectorY ... > ... 0

You can mimic all picks found in the sprite conditions by a pick by compare.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Wed Sep 28, 2016 4:09 pm

Those two conditions

Text->compare variable
And
System->pick by comparison

Should give identical results as you have pictures there. What are the differences you observe?
B
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

Post » Thu Sep 29, 2016 2:21 pm

When I am doing nested picks using the compare it doesn't seem to work. I'll see if I can replicate this behavior again in a test file.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824

Post » Thu Sep 29, 2016 11:48 pm

[incorrect comment removed so I don't mislead people :oops: ]

...haven't used it much but that's my understanding from what I've read
Last edited by badmoodtaylor on Fri Sep 30, 2016 1:50 pm, edited 1 time in total.
ImageImageImage
B
39
S
22
G
11
Posts: 492
Reputation: 9,925

Post » Fri Sep 30, 2016 1:43 am

No, it still picks from what's currently picked. I've used both extensively and they work as expected.
B
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

Post » Fri Sep 30, 2016 1:48 pm

R0J0hound wrote:No, it still picks from what's currently picked. I've used both extensively and they work as expected.


Ah, yes. I think I was thinking of the pick all
ImageImageImage
B
39
S
22
G
11
Posts: 492
Reputation: 9,925

Post » Fri Sep 30, 2016 1:50 pm

Now I can't replicate it, lol. I was juggling a lot of instance variables too though, so I suspect I had some crossover causing confusion.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,415
Reputation: 4,824


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], Yahoo [Bot], yiuyiu6666 and 12 guests