PDA

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


millew
04-29-2013, 10: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.

Thanks!

sfunk
04-29-2013, 11:19 AM
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

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

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