Alice Community  

Go Back   Alice Community > Alice 3 > How Do I?

Reply
 
Thread Tools Display Modes
Collecting items in Alice 3, but there are something wrong. Help me!
Old
chicky371
Junior Member
 
Status: Offline
Posts: 3
Join Date: Apr 2018
Location: I live in Ho Chi Minh city, Vietnam
Default Collecting items in Alice 3, but there are something wrong. Help me! - 04-30-2018, 07:18 AM

I would like the diamond to be invisible and to be gotten the score after the character hits the diamond by using collisionListener in Events, but something goes wrong. When my character is near the first diamond, suddenly all diamonds disappear. I just want a diamond to disappear. It will be true if I set up collision command for one diamond, but I'd like to save the time because there are many items in my game, it's just a test. I need help for 'Array'

The link to my world: https://drive.google.com/file/d/1fue...ew?usp=sharing
   
Reply With Quote
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 249
Join Date: Dec 2012
Location: Frosno, Ca
Default 04-30-2018, 04:46 PM

Quote:
Originally Posted by chicky371 View Post
I would like the diamond to be invisible and to be gotten the score after the character hits the diamond by using collisionListener in Events, but something goes wrong. When my character is near the first diamond, suddenly all diamonds disappear. I just want a diamond to disappear. It will be true if I set up collision command for one diamond, but I'd like to save the time because there are many items in my game, it's just a test. I need help for 'Array'

The link to my world: https://drive.google.com/file/d/1fue...ew?usp=sharing
You need to
  1. Create a variable of type sthing - its the root object type
  2. Assign the "getThingFromSetB" sthing to this variable
  3. Compare each diamond to the sthing in an if statement to see which one was hit.
I modified your example showing this but I would recommend doing it yourself in a movie as well because creating the variable and the if statement are not obvious the first time through in Alice.

Mark
Attached Files
File Type: a3p Item_Collecting_v3.a3p (43.7 KB, 2 views)


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote
Old
kelbstar123
Member
 
Status: Offline
Posts: 18
Join Date: Feb 2018
Talking 05-02-2018, 08:43 AM

looks good is it going to be like a temple run or something?
   
Reply With Quote
Reply

Thread Tools
Display Modes

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 ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.