Family Container Picking?

New releases and general discussions.

Post » Mon Jul 06, 2009 2:44 am

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 :mrgreen:

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.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Mon Jul 06, 2009 3:01 am

I tried this too, assuming it would work :P
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Mon Jul 06, 2009 3:05 am

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....
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Mon Jul 06, 2009 3:44 am

[quote="Aeal5566":uk3wqdvp]Im guessing that the event would just not run for E[/quote:uk3wqdvp]
i think that it just wouldn't know which blue to pick, which is logical.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Mon Jul 06, 2009 9:00 am

[quote="Davioware":2e7g4xa5]i think that it just wouldn't know which blue to pick, which is logical.[/quote:2e7g4xa5]
Which means it would pick them ALL, as that's how it's done in the rest of Construct.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Mon Jul 06, 2009 2:56 pm

[quote="Madster":1cs79mkv]Which means it would pick them ALL, as that's how it's done in the rest of Construct.[/quote:1cs79mkv]
yea. :mrgreen:
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Mon Jul 06, 2009 9:03 pm

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).
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue Jul 07, 2009 6:38 am

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?
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Tue Jul 07, 2009 8:14 am

Not in this version of Construct; you'll have to stick to per-object containers.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest