To save created object while moving to diff layout

0 favourites
  • 4 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hello every one.

    I was trying to learn the create objects and then removing them one by one on click. every things go right (thanks to so many helpful topics in the forum). Then I created another layout and tried to go back and forth in two layouts. The problem started here. Every time i create some copies of my sprite and then go to the next layout and then come back, all of my copies are removed but just one.

    I am trying to store the copies that I'v created in a layout. The copies should not remove when u go to next layout and come back again. My lack of programing is my weak point.

    Thanks in Advance

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use Webstorage to record your X and Y values of your created objects and load them each time you visit a certain layout.

    https://www.scirra.com/manual/120/webstorage

  • If you add the Persist behavior to your objects that you want to remain then you should be good.

  • thank you all for your help. Special thanks to "Burvey" your idea worked like a charm. I even invented a non conventional method for doing the same. I made that object global and make it visible and invisible according to the layout. But I would prefer "Persist" Behaviour. Kazaa thanks for your reply I am sure that this would also work but I do not know how to use Webstorage.

    Thanks again.

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