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

Get help using Construct 2

Post » Sun Apr 06, 2014 9:34 pm

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?
B
9
Posts: 18
Reputation: 361

Post » Sun Apr 06, 2014 9:58 pm

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.
B
8
S
1
Posts: 76
Reputation: 949


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Yahoo [Bot] and 64 guests