How to use "Global" items without affecting other layouts?

0 favourites
  • 2 posts
From the Asset Store
In this template the music plays without looping in your game
  • I'm making a game that has a street layout full of buildings. On the street, there are items you can pick up. You can enter each building (new layout). In each building, there are items you can pick up. All of the pick-up items are "Global" so they will stay fixed until the Player picks them up.

    Problem: They are "Global" and will appear in other layouts. Items on the street will appear in the building, items in one buildings will appear in other buildings, probably because they share the same X,Y on their layout.

    Is the only answer to this by making a HUGE layout size, where items will not share the same X,Y? I'm making a layout of 5000x8500 that contains all of the buildings' interiors. That should not affect building-to-building pick up items from appearing in a different room.

    Is there another way to prevent "global" items from appearing in other layouts with a simple code? Or keep them contained within 1 layout and not reappear on start layout AFTER they have been collected?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Without a .capx or seeing how you coded it it is hard to even try and come up with a solution to your problem.

    The only thing I can think of to comment on right now is that you could have an item set its Global variable to 0 after it is collected and make it so that if the items variable equaled 0 then it would not spawn.

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