[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
33
G
29
Posts: 3,137
Reputation: 28,130

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
381
S
222
G
84
Posts: 23,975
Reputation: 189,160

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
33
G
29
Posts: 3,137
Reputation: 28,130


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests