How do I see if a member of a family is global?

0 favourites
  • 3 posts
From the Asset Store
Globals 2.0
$3.60 USD
10% off
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • Hello;

    I have a family, called cork--some members are global sprites, how can I find out (once the game is running) if a particular member (UID) is global or not?

    thanks for your time

    yours

    Winkr7

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't think there is an expression or condition to check whether an instance is global. So you'll have to create your own property. Maybe a family instance variable, that you set to true with various "on created" triggers of your global members of the family.

    If you only need to test one UID at a time, you could also create another family but only add your global "Cork" ("CorkGlobal"). You could then have a function that test if "pick by UID" returns 1 instance in both family, indicating that your "Cork" is also a "CorkGlobal".

  • Thanks Magistross you are always helpful.

    I think I will do as you suggest and create a family called globalSprite and put all my global sprites in it--then cast cork (using pick globalSprite by cork.UID) and if it is a member I know it is a global cork.

    I was hoping there was some other way to check.

    thanks agaim.

    yours

    winkr7

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