Same sprite in multiple layouts

This forum is currently in read-only mode.
From the Asset Store
Be quick and choose the right answer for the shown equation.
  • I can't seem to figure out how to do this, without copying and pasting for each layout i make. Help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • try make it global.

    properties-common->global

  • If you make the sprite global, it is accessible from any layout AFTER the one the sprite is on loads. But in editor the sprite won't be available, only through event sheet. Also, the sprite keeps any data between layout changes - for example if it has been moved, it will be there when you go to new layout.

    So, with global sprites, keep this in mind:

    • reset their variables and/or position/size/etc as needed on layout change (or just delete it if you don't need it, then recreate)
    • it is a good idea to make a sprite global, then have it destroyed on start of layout, then wherever you need the sprite, just create it, then when it is not needed anymore, destroy it - unless you want to keep the sprite data

    So, in short, when the sprite is made global, it is available everywhere through code and it keeps any data.

  • Cool thanks!

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