Family Creates ONLY one of the Sprites instead of ALL ?

0 favourites
  • 10 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • I have "Player_1" = invisible Sprite that holds the controls and collision.

    I've created 2 different sprites inside a Family: "Player_1_Animations" (will add more to it later)

    "Character" - include the base character animations (Idle, Walk, Jump, Fall, Hurt, etc..)

    "Character_Weapon" - include ALL the different weapons (same animations as above)

    Each of the sprites in "Player_1_Animations" family have ALL the exact same animation names, same speed, and they fit PERFECT if they are above each other (play as one)

    So far so good...

    The problem is that when I first Create "Player_1" to the scene, it will only show ONE of the Family sprites, either the Weapon or the Character but not both.

    How do I make ALL family members appears as soon as the Family created?

    I'm planning to add more sprites to this family but I want to make sure it works first.

    Thanks ahead for any help!


  • You create the objects individually. Family is for applying something to all members of a family.

  • Thanks for the explanation!

    I tried this:

    But now it won't pin the created sprites to "Player_1" anymore...

    How can I PIN them as soon as they created? because I will probably add more sprites to this family and ALL must be synced perfectly.

  • Families and objects pick separately. 'Create object' picks the created instance. If you want to use that instance in later actions, it must be an action in the same object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply Ashley!

    I'm sorry I tried to follow but I'm still confused. based on what I explained (first thread above)


    How can I create these 2 Sprites that related to the family and PIN them to the "Player_1" sprite?

    I tried to Create using the system create object, but it won't PIN them after created.

    I tried to Create by spawn them from "Player_1" as soon as it's created but I get the same result...

    Both Sprites created, but not PINNED to "Player_1"

    so am I not spawning right? or there is something I'm missing related to the PIN action?

    Thanks ahead! :)

  • Because you have player object and 2 objects pinned to it that have same animations, I'm not sure why you're using Families? You can maybe make use of a container which groups everything together and all are created and relate to each other. By using Families you are restricting yourself because you cannot pick individual objects. In the screenshot above you should pick the individual objects and pin them, not use a Family.

  • The reason I'm using families is because the control of the position, z-depth and animation in the code later on, I must have all of the animation sprites with same names / speed to work together.

    I tried to use Containers but, I don't know how to work with it... maybe I should give it a try but from my last experience I gave up on it because I couldn't understand how to control it.



    I made it work, but is it efficient enough?

    I don't want to have sync / lagging / delay later on that's why I wonder:

    UPDATE #2

    I just tried to use Container as you suggested :)

    So, I still have the Family for the reason I explained above, but not even sure if I need it ??

    Also, is it going to sync better even when I'll add few more sprites (more equipment, each animated, same idea as I explained above)

    Thanks ahead!

  • Containers is the correct use here, looks like you have it working. No you do not need to use Family for this, the container allows you to pick 'player' which also picks the related objects in the container at the same time. Family use would be if you wanted to apply something to multiple 'player' objects.

  • Thanks! :)

    So... if I'm not using Families in this case and I will use "Player_1" (the container) only.

    Will I be able to change animations to ALL the sprites that are inside the container as well in the event sheet instead of doing it individual one by one? (per sprite) ?

    Because I will have to have both individual control (As I can just point specific sprite on the even sheet of course) but what about ALL ?

    For example, if I change "Player_1" animation will it also change the others?

    Same for Z-depth, who will be on top and so on...

    In general I need access to control ALL in one, and also individual of course (per sprite as I already)

    Sorry for the confusion.

  • It won't work exactly like that but if you pick player 1 and say change animation of object A and object B, it would change the object A and B related to the player 1 that was picked so you have some control.

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