"Global" object type feature request

Not favoritedFavorited Favorited 0 favourites
  • 8 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.
  • I usually don't post my feature requests on the forum but this one would be quite neat/important to have for me. So I hope I get some eyes on it. *cough Diegos or Ashleys eyes cough*

    github.com/Scirra/Construct-feature-requests/issues/639

    Although I have a feeling that nobody really uses this feature. Global layers I do see mentioned here or there, but global objects? Not so much. Maybe by coincidence since Arrays are by default global.

    But I do believe being able to set global on a per-instance basis rather than the entire object (and at runtime) would be a really useful upgrade to this feature.

    Cheers!

  • I use global objects. Mainly for text or backgrounds.

  • Global object type? Type as in array, sprite, 9-patch etc, there would be extra global item? What would it do besides being global?

    Or you mean global family, where one could add all objects, so all objects could be picked as opposed to picking only one object type?

    The last one would be absolutely useful as I need to check if mouse is over any object regardless if it is sprite, 9-patch etc.

  • Global as of right now means that if something is set to "global" it will not be destroyed when you change the layouts. You can set e.g. a Sprite to global, but this will automatically apply to all instances of the Sprite. My suggestions is about having the option to apply this per-instance and also be able to set this at runtime. Although if you read the suggestion + comments I think the whole "global" thing might not be necessarily the correct idea. It just does functionally what I want, which is to not destroy an instance automatically when the layout is changed. So really, a behavior that does this would be perfectly fine.

  • Why not create two similar objects, one global the other not, put them in a family, and do all event logic on the family and use the object you need?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you read the suggestion on github you can see that this is one of the proposed workarounds. But it makes any kind of updates to these objects annoying (updating the sprite, image points etc.) and it doesn't fully adress the issue I outlined in the suggestion (not able to change it at runtime depending on need)

  • What if you make the objects global and add an instance boolean? Then on start/end of layout, check the boolean and, if false, destroy the instance?

  • There is another distinct issue with global objects in that once they are destroyed, they do not respawn again. As an example:

    Goblin has a sword, the sword is global with a boolean as suggested. If I now leave the layout, I need to destroy said sword. If I then return to the layout, the sword is now actually gone and does not respawn, so now my goblin doesn't have a sword anymore.

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