Multiple layout problems

0 favourites
  • 6 posts
From the Asset Store
Transition Layout C3
$22.50 USD
10% off
Plugin Transition Layout C3. Layout opening and closing animation for C3. Quickly set up transitions between lay
  • I have a game that has more than one layout and you can move between the layouts as you like. I have a global Event sheet that they both share. I use this event sheet to hold events that can happen on either layout. (like a treasure chest or power up event will be in the global events because it can be on both layouts)

    The problem I am having is that when I travel between both layouts then pick up a item it will take the item one layout 1 and also take the item on layout 2 but only if I have been to both layouts.

    Anyone know why it would do that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would guess you are using a global variable to control the item pickup system, which in some cases is not recommended, but for a better guess, please add your code image here so I can help you.

  • It would be easier to just let u look at the project since it is multiple event sheets.

    https://www.dropbox.com/s/h5xuvt6ufoyfp ... .capx?dl=0

  • in that example i sent u can use the portal to the left to go to another layout and currently the orange box is set to global. But if you leave from one layout to the next over and over they start doing weird things.

    I want it to be able to pick up(walk into one and destroy) and it stay picked up even when u leave to the next layout and come back. I do not want it to respawn

  • So, I created another sprite with the same condition of the "Pickup" sprite. Player on collision with "sprite" -> destroy, and it happens to work fine for this new sprite, but not for your "pickup" one... Anyway, I couldn't find the problem with the "pickup" sprite but I would just delete it and create another one...

    And if you want the layout to remember the collected/destroyed objects you could use the Persist behavior https://www.scirra.com/manual/161/persist

  • thanks that persist behavior was what i was missing, I forgot all about that

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