Family Container Picking?

This forum is currently in read-only mode.
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • This has bugged me for a while..

    say you have 2 families, red and blue.

    now we have 4 sprites, A,B,C,D

    -A is part of red

    -B is part of blue

    -C is part of red

    -D is part of blue

    A is in a container with B

    C is in a container with D

    Why can't we do..

    Always>> Red(set position) to Blue

    Then A will be set to B

    and C will be set to D

    It should automatically pick both contained objects, shouldn't it? Maybe this creates logic conflicts somewhere but i just haven't thought about it long enough to come up with a concrete answer.

  • I tried this too, assuming it would work

  • What would happen if you added an E into red but no counter part in the red family?

    Im guessing that the event would just not run for E

    I was looking into making a family with a hash table contained in it that way eveything could have its own hash table but you cant do the family containers....

  • Im guessing that the event would just not run for E

    i think that it just wouldn't know which blue to pick, which is logical.

  • i think that it just wouldn't know which blue to pick, which is logical.

    Which means it would pick them ALL, as that's how it's done in the rest of Construct.

  • Which means it would pick them ALL, as that's how it's done in the rest of Construct.

    yea.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If there are the same number of all objects, it should work. But I think there's a bug in the action with the object parameter that could prove hard to fix. Try it with the other action which takes an X and Y coordinate ('Set position') and enter Blue.X and Blue.Y. It does the same thing as the other action, but without the bug, and they should all pair up OK (I think).

  • Is it possible to put a hash table in a family as a container? So each instance of an object in that family have a hash table with them?

  • Not in this version of Construct; you'll have to stick to per-object containers.

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