Pick by evaluate

For questions about using Classic.

Post » Wed Jul 30, 2008 2:15 pm

Quick question, what does the new pick by evaluate event do, I have a feeling it could help me out with something but I dont really know.

Does it pick the highest/lowest of the expression entered or something like that?

thanks
B
2
S
2
G
5
Posts: 236
Reputation: 2,122

Post » Wed Jul 30, 2008 3:40 pm

Oh you can select for example the object who have bigger private value, or just if its equal to something. It should be good at RTS games since there are a lot of copied objects.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Wed Jul 30, 2008 4:38 pm

'Pick by evaluate' checks the expression for every object, and picks it if the expression is not zero.

You can use the OR and AND expression operators to do advanced picking, for example:

Pick by evaluate (Sprite.X < 500) AND (Sprite.Y < 500 OR Sprite('Flag') = 1)
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,208

Post » Wed Jul 30, 2008 8:51 pm

[quote="Ashley":2298ios3]'Pick by evaluate' checks the expression for every object, and picks it if the expression is not zero.

You can use the OR and AND expression operators to do advanced picking, for example:

Pick by evaluate (Sprite.X < 500) AND (Sprite.Y < 500 OR Sprite('Flag') = 1)[/quote:2298ios3]

That's a very handy feature.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Jul 30, 2008 8:51 pm

[quote="deadeye":1kfrtznh]That's a very handy feature.[/quote:1kfrtznh]
I agree. I can think of many uses for it.
B
2
S
2
G
5
Posts: 512
Reputation: 2,674

Post » Fri Aug 01, 2008 3:56 am

'Does it pick the highest/lowest of the expression entered or something like that? '
That's an interesting idea. You can do that by setting a private variable and picking the highest...but do you think a 'pick highest evaluation' and 'pick lowest evaluation' would be worth programming? Should we add it to the todo list?
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Tue Aug 05, 2008 3:02 pm

thanks, that is useful

pick by highest/lowest expression would be cool to see even if you can already do it a convoluted way, (much like this you could probably do a weird way before) it'd just simpler.
B
2
S
2
G
5
Posts: 236
Reputation: 2,122


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest