Families and object pairing

Post your own tutorials, guides and demos.

Post » Sat Mar 28, 2009 8:13 pm

We have small problem with families and object pairing heres the file
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Sat Mar 28, 2009 8:18 pm

Basically, what (we thought) was supposed to happen when the cap runs is that it will create a green mech with a shoulder mounted yellow rocket launcher and arm mounted red rocket launcher....it didnt :x im guessing we didnt use families or the object pairer right? :oops:
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sun Mar 29, 2009 12:29 pm

I've not toyed with the object pairer so I'm not clear how it works compared to containers, but what I'm noticing is that in the Weapons sheet, EVENT 1, you're destroying the Weapon but not creating it. Toggle the Destroy action and it'll set the weapon correctly.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Sun Mar 29, 2009 3:40 pm

Ah, thats because it creates them later on if you expand the subevent. Hoped that was the problem but running it without the destroy action still didn't seem to place the weapons in the right spot :?
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Mon Mar 30, 2009 9:11 pm

Ah soz I didn't even notice that! Damn I need a new monitor!
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Tue Mar 31, 2009 3:39 pm

lol no problem, thanks for trying to help us out though :)
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Tue Mar 31, 2009 8:03 pm

a less complex example of your problem would have been helpful - i had a lot of confusing moments trying to comprehend that cap... i see two things:

for correct pairing, you not only need the 'For each paired' condition, but you also need to follow it up with a 'Pick paired' to get the correct instances.

you are referencing image points by numbers, which (afaik) selects them in the order of their creation. i guess you want to select them by name, because you named them with numbers.

if i fix those, it sometimes works (a mech with 2 weapons appears). i've got no idea why this is random, but i strongly suspect your questionable practice of spawning families. to sum it up: i have no idea what's going on :P
B
2
S
2
G
4
Posts: 171
Reputation: 1,792

Post » Thu Apr 02, 2009 9:19 pm

[quote="dkdoom":1jlk11k3]a less complex example of your problem would have been helpful - i had a lot of confusing moments trying to comprehend that cap[/quote:1jlk11k3]
Ah sorry bout that :oops:
And yeah, I probably was doing it wrong so I moved on to a simpler solution now instead. Thanks for making it a bit less broken though, if I use families again in the future it will help me alot :D
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 3 guests