How do I pick object UID within family? [Solved]

Get help using Construct 2

Post » Mon May 26, 2014 11:45 am

Time for a more simple question (I hope).

In my game I want to be able to select objects by clicking on them with the mouse. All these objects are part of a family that share some traits, but I'd like to get the UID of the particular object that was clicked.

So far I have "On family clicked -> options appear." Like this:
Image

This code worked while the game was using just one object type instead of a family. But obviously not anymore, since it's just using the family UID instead...

Any tips for what I need to add in there?
Last edited by Vati-nyan on Mon May 26, 2014 2:14 pm, edited 1 time in total.
B
10
S
3
G
3
Posts: 110
Reputation: 2,206

Post » Mon May 26, 2014 12:20 pm

That should still work. Units.UID will give you the object's UID. There's no "family UID".
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Mon May 26, 2014 1:32 pm

Hmm strange, since it seems to now pick all the objects of the same type in the family. Maybe I messed something up elsewhere, will have to make another pass through.

Edit: Found what I did wrong... one little piece that I had forgotten to switch out. Thanks for the quick reply though, it always helps to be able to rule things out :)
B
10
S
3
G
3
Posts: 110
Reputation: 2,206


Return to How do I....?

Who is online

Users browsing this forum: Solomon and 11 guests