View Full Version : How to collect and keep track of items?

04-29-2013, 11:12 AM
I'm making a maze game where you collect 5 items and then once you have collected those 5 items it triggers another event (like a gate opening or the character is transported somewhere). How would I do that? Right now I have it where once you find the item, you click on it and it goes away. How do I keep track of the items so when I click on all 5 of them, an event or something is triggered.

My file isn't uploading but I can try later if you need it.


04-29-2013, 12:19 PM
Create a number variable under the world's property menu, and have it increment by one every time an object is collected. then have an if statement check to see when the variable equals five or how many you have

04-29-2013, 01:53 PM
Where do I put that if statement?

04-29-2013, 03:20 PM
Just put it into a method and have it check after each click of the mouse