object pairer question

For questions about using Classic.

Post » Sun Jul 26, 2009 3:10 am

Say I've paired the sprite Bs with the sprite As succesfully.
If I click on a sprite B, I want to set a value on the related Sprite A object. But when I try to do this it gives the value to all of the sprite A instead of SpriteB's pair.
Is it possible to do that with the pairer?

B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Sun Jul 26, 2009 9:50 am

If I remember it correctly... if you have paired Sprites B with Sprites A correctly, then this should work:

[code:1bana30c]
+Sprite B clicked
+Pick paired (Sprite B)
+For each paired (Sprite A)
>Change value to Sprite A[/code:1bana30c]

But I'm not sure, I haven't worked with object pairer in a while. David should know better, there is a pairer example by him with rocks and veggies. :)
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sun Jul 26, 2009 12:52 pm

I couldn't get that to work, I'll try looking for david's example!


edit:

mipey you almost had it right, just need to have it do for each sprite B then pick paired

[code:2ep7rpqx] +Sprite B clicked
+For each paired (Sprite B)
+Pick paired (Sprite A)
>Change value to Sprite A[/code:2ep7rpqx]


edit 2: that code broke my pair positioning, but I fixed the positioning by following daves pair example -- I was positioning the pairs like in your turrent example mipey, but that doesn't to be the right way to do it
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Sun Jul 26, 2009 1:20 pm

Well, yeah, I haven't completely conquered the concept of object pairer. :P
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sun Jul 26, 2009 2:09 pm

I'm so glad its all working now, this pairer thing is so awesome.. argh!
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest