global objects

This forum is currently in read-only mode.
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.
  • Hey, I checked around and I couldn't find anything, maybe I overlooked.

    Is there anyway to transfer objects from one layout to another? I checked global in the object properties but when I made the new layout the objects didn't transfer over in my objects bar. I can copy and paste, but I was just double checking to make sure I wasn't missing something.

    I probably looked over something simple which will end up making me feel stupid haha. Anyway, thanks for the help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No you didnt miss anything it really does work that way. I never really find having sprites and such set to global a good thing. I usually right click the layout in the layout menu and clone it.

    The only stuff I would mark global would be things like mouse and keyboard function object and any object that does not show in the layout. and if you do clone the layout make sure to delete any gobal objects so you dont have two instances running at the same time. so here it is in list form:

    Dont make visible objects global.

    Clone the layout instead of making a new one.

    Delete any global Non-layout stuff from the layout(Mouse and keyboard,Function,etc)

    The reason I never have visible object global is because if you go to another layout it will stay in the original layout and you will have two instances going at the same time so its better to keep them not global and just have an instance in every layout.

  • thanks for the tip!

  • Or you have one visible global object in the whole game; you can use it in all layouts, however it will only appear on its parent layout's object bar. Well, I have no problem with that, as I typically declare globals on one (starting) layout. No need to clone stuff at all and that way I retain variables (such as character's experience). If you just clone stuff, the clone won't remember anything.

    Well, that depends on what you use the sprite for! If it doesn't store any information that you are going to need in later layouts, it is fine not to make it global and just copy it into next layout.

  • As Aeal stated, the only object's you'll generally want to be global are ones which have a useful function to carry across layouts, like arrays, XAudio2, and soon to be the Online plugin.

  • ah, I was under the impression that being marked as global would make the same objects appear in each object bar, but yeah I think I've got the jist now! Thanks for your help everyone, it's really appreciated!

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