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

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

    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?

  • That should still work. Units.UID will give you the object's UID. There's no "family UID".

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)