[r90] Family isn't responsive to every objects

Bugs will be moved here once resolved.

Post » Wed May 16, 2012 12:13 am

Look, i'm not sure it's a bug, we were testing an engine to get "!" when it happens a player is near to familiy object like fish. This one (left) works:






and other fish (right) doesn't work:







They are part of family.




There a .capx file, you may see it.
http://dl.dropbox.com/u/76227787/FamiliyBug.capx
B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Wed May 16, 2012 12:11 pm

This is not a bug. As the 'Compare values' description says, it does not pick any objects, it just retrieves and compares two simple numbers. If you use an object in an expression it only picks the *first* one, it will not check any other instances at all.

Solution:

Fishes: pick nearest to Guy.X, Guy.Y
System: Distance(Guy.X,Guy.Y,Fishes.X,Fishes.Y) <= 130
-> Set exclamation position

Else
-> Set other position

This works because it picks the single closest instance, then checks if that is near enough.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Wed May 16, 2012 9:41 pm

Ah, you explained about "Compare Values" doesn't pick any objects, then i understand and thank you!

B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests