[Request] Global Instances of an Object

0 favourites
  • 5 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • It would be cool if you could mark individual instances of an object as global instead of the whole object type. This is practical in instances such as having HUD global spritefonts and then wanting to use the same spritefont for a message box or something but then the global property screws it all up for the localized instance of the spritefont.

    Also this is a little off topic but it would be handy if the sprite font could load images from within the game's files.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:1bzxdw8j]This is practical in instances such as having HUD global spritefonts and then wanting to use the same spritefont for a message box or something but then the global property screws it all up for the localized instance of the spritefont.

    actually its more an issue of picking the right text instances, having a variables name="score" tag="hud" can help you here , making a function out of it also helps, or you could simple check if they are on a certain layer, many possibility's..

    [quote:1bzxdw8j] it would be handy if the sprite font could load images from within the game's files.

    yes it would, and maybe having the same ability like sprites to change frames, right now im using a spritefont family to do all my picking, +different spritefontobjects for different styles, having more control over spritefont, is definitly something i would like to see

  • You can already do this. Non-global objects are simply destroyed at the end of the layout. So make the object type global and at the end of the layout, destroy the ones you don't want to act globally.

  • The spritefonts never come back though after destroying them even if you return to the layout they originated from.

  • That's because they've been destroyed. Destruction is permanent on global objects, across all layouts. Returning to their originating layout won't recreate those objects because they exist "above" the concept of layouts.

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