[SOLVED] How do I 'Pick' nearest where inst. variable = x?

Just started using Construct 2? Post your questions here

Post » Tue Dec 30, 2014 12:44 pm

G'day again guys.
I've looked and can't find. I want to 'pick nearest object' where that objects instance variable also = "idle".

This is what I have at the moment and it does pick the nearest, but, as you can see if that nearest doesn't have instance variable 'Status' = "IDLE" then nothing happens.

What I *want* to do: Pick that nearest instance, if the Status variable isn't "IDLE" pick the next nearest.
scirra002.jpg


Any ideas?
Thanks in advance - Humpty
You do not have the required permissions to view the files attached to this post.
Last edited by humpty on Tue Dec 30, 2014 2:01 pm, edited 1 time in total.
B
7
S
1
Posts: 26
Reputation: 549

Post » Tue Dec 30, 2014 1:33 pm

Try picking status=idle and then pick nearest after that.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Dec 30, 2014 2:00 pm

You're so awesome :* :* :* :*
I thought about that, but in my head it didn't seem it would work. (I should have tried it instead of deciding it woudn't)

THANKS :* :*

scirra003.jpg
You do not have the required permissions to view the files attached to this post.
B
7
S
1
Posts: 26
Reputation: 549

Post » Tue Dec 30, 2014 9:06 pm

Some things are not entirely intuitive in C2.. I just think try and think through the picking/filtering. (Start with the largest group of instances you want to match, not the smallest). You can also have the above in one event, but that's just an optimization.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests