How do I pick 2 objects in family

Get help using Construct 2

Post » Wed Apr 09, 2014 4:00 pm

Hi everyone,

Im having a problem with a family.
I have 2 objects in the family.
A "lemon" and an "apple"


however, i have copied them in the layout, so there is 2 lemons, and 2 apples in the game.
How can i pick both lemons in the family, when i click a single lemon?

i really need your help on this!
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Wed Apr 09, 2014 4:52 pm

Anyone got an idea?
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Wed Apr 09, 2014 5:12 pm

Upload the file an i fixed for you.
B
48
S
9
G
10
Posts: 200
Reputation: 8,258

Post » Wed Apr 09, 2014 5:16 pm

I don't know a lot about family's , but may try to make separate family's . 1 apple family and 1 lemon family, I'm sure there's a easier way but until you find it this may work.
Please Support Ocean Explorer.
http://igg.me/p/735007/x/6915815
B
14
S
4
G
3
Posts: 125
Reputation: 2,645

Post » Wed Apr 09, 2014 7:21 pm

If you want to pick only lemons, just use System> Pick All> Lemons, no need for a family here
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Wed Apr 09, 2014 7:25 pm

I have quite a number of objects in the family (more fruit)
So i would love a solution that makes it easy to do.
Anyone else has an idea?


I'll upload an capx later if someone will take a look at it.
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Wed Apr 09, 2014 7:53 pm

Unfortunately I don't have a solution for this, and can't even try to find one now, I'm on a mac. Sorry
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Wed Apr 09, 2014 7:55 pm

No problem, but thanks anyways! it was nice of you :)
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Post » Wed Apr 09, 2014 8:15 pm

@xanxion

you should just give the fruits family a variable fruittype = "lemon" or "otherfruit"

on click family fruits // this picks one fruittype
compare familyvar fruittype
fruittype = "lemon"

subevent : system: pick all fruits(family) // this resets the "onclick" picking to all fruittypes
family fruittype = lemon (this will pick all fruittypes of lemon)
Last edited by vtrix on Wed Apr 09, 2014 8:20 pm, edited 1 time in total.
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Wed Apr 09, 2014 8:17 pm

Ahh, so i just make an instance variable on all the objects in the family, and then pick all "instance variable" ?
B
37
S
9
G
8
Posts: 541
Reputation: 8,554

Next

Return to How do I....?

Who is online

Users browsing this forum: marcinkowski and 13 guests