Familly-Container referencing bug

0 favourites
  • 10 posts
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • 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.

  • The family isn't associated to the containers. Those are parent/ child only.

    Try for each.

  • i dont think u understand

  • 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.

  • this shows the whole project

  • 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.

  • 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

  • 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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)