Alice Community  

Go Back   Alice Community > Alice 2 > Works-In-Progress

Reply
 
Thread Tools Display Modes
How to collect and keep track of items?
Old
millew
Junior Member
 
Status: Offline
Posts: 5
Join Date: Apr 2013
Default How to collect and keep track of items? - 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!
   
Reply With Quote
Old
sfunk
Senior Member
 
sfunk's Avatar
 
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 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


If you are stuck on a project, check out the tutorials I made here at this link:

http://alice.org/community/showthread.php?p=36778#post36778

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

http://www.youtube.com/user/sfunk1992?feature=mhsn
   
Reply With Quote
Old
millew
Junior Member
 
Status: Offline
Posts: 5
Join Date: Apr 2013
Default 04-29-2013, 12:53 PM

Where do I put that if statement?
   
Reply With Quote
Old
sfunk
Senior Member
 
sfunk's Avatar
 
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 04-29-2013, 02:20 PM

Just put it into a method and have it check after each click of the mouse


If you are stuck on a project, check out the tutorials I made here at this link:

http://alice.org/community/showthread.php?p=36778#post36778

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

http://www.youtube.com/user/sfunk1992?feature=mhsn
   
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.