Familly-Container referencing bug

Bugs will be moved here once resolved.

Post » Sun Apr 05, 2015 9:13 pm

Problem Description
i have a Family that includes all "NPC" characters, this family is named "characters.
Each "NPC" is a container of multiple sprites (spriter plugin), one of those sprites is called "origin" defines a character position in the layout, so it doesnt move along with the character, if the character moves it knows where to return to using this origin.X and Y.

The Resulting behaviour
When i filter using the "character" family, then apply an action such as "Action: characters set gotoX to origin.X" all "NPC"s return to the "origin" of the first "NPC" in the family that has IID = 1.

The Fix
if i replace the characters object in the action with "NPC" object, it works correctly and every "NPC" returns to its designated "origin" sprite. (note i didnt change the condition, it still filters using the family object"

i believe using the first action should result the correct behaviour since when referencing other objects that belong to a container even if that container belong to a family should link to that container.
B
3
Posts: 6
Reputation: 187

Post » Sun Apr 05, 2015 9:45 pm

The family isn't associated to the containers. Those are parent/ child only.
Try for each.
Image Image
B
164
S
49
G
112
Posts: 7,638
Reputation: 78,475

Post » Tue Apr 07, 2015 2:08 am

i dont think u understand
B
3
Posts: 6
Reputation: 187

Post » Tue Apr 07, 2015 2:27 am

Image

as u can see i boxed 3 elements
u can see the "position" sprite is part of "boldPlayer" container, and "boldPlayer" is part of "Players" family.
dont you think the action should set the "GoToX" instance variable to the correct "position" sprite (which belongs to boldplayer container) X value?
if you dont then u havent read ur manual correctly.

and to prove that this is a slipped bug, when i replace the "players" object in the action with "boldplayer" object it works correctly, otherwise it assigns the x value of the first family member "position" to all family members.
B
3
Posts: 6
Reputation: 187

Post » Tue Apr 07, 2015 2:30 am

Image
this shows the whole project
B
3
Posts: 6
Reputation: 187

Post » Tue Apr 07, 2015 4:35 am

Containers do not automatically associate with families.
Its not a bug.
Its been asked for already, but creating that kind of hierarchy is rather complicated, whereas working around it is as simple as creating a sub-condition that picks part of the container in the original condition.
Image Image
B
164
S
49
G
112
Posts: 7,638
Reputation: 78,475

Post » Tue Apr 07, 2015 2:15 pm

hmm... u should consider mentioning that in ur manual. plus as u can see i have many kinds of players since this a football team.... so am gonna have to add an action for every type of player...and am planning to have plenty...impractical!! but thank you for your reply..its good enough to get a response
B
3
Posts: 6
Reputation: 187

Post » Tue Apr 07, 2015 2:18 pm

oh and btw..its easy to implement this required feature...u simply make the action replaces the family object with each filtered family member under the hood.. to the user the action is applied to the family object, behind the scene it apply on the family member itself, as u said a for each
B
3
Posts: 6
Reputation: 187

Post » Tue Apr 07, 2015 2:29 pm

Hopefully C3 will be making some steps to give this functionality.
It really shouldn't have anything to do with containers, but be a new feature on its own.
Image Image
B
164
S
49
G
112
Posts: 7,638
Reputation: 78,475

Post » Mon Apr 13, 2015 11:29 am

Closing, please follow the bug report guidelines.

BTW it's a known design limitation that picking families does not also pick containers. This would be difficult to resolve without an engine-wide performance impact. It is possible to work around though.
Scirra Founder
B
366
S
217
G
82
Posts: 23,260
Reputation: 183,580


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests