Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How Do I? (http://www.alice.org/community/forumdisplay.php?f=28)
-   -   Collecting items in Alice 3, but there are something wrong. Help me! (http://www.alice.org/community/showthread.php?t=11976)

chicky371 04-30-2018 07:18 AM

Collecting items in Alice 3, but there are something wrong. Help me!
 
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'

[B]The link to my world: [/B][url]https://drive.google.com/file/d/1fueK6JbYGc3Cq3g8EWey-z9D-MnqYGJz/view?usp=sharing[/url]

chickentree 04-30-2018 04:46 PM

1 Attachment(s)
[QUOTE=chicky371;58004]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'

[B]The link to my world: [/B][url]https://drive.google.com/file/d/1fueK6JbYGc3Cq3g8EWey-z9D-MnqYGJz/view?usp=sharing[/url][/QUOTE]

You need to[LIST=1][*]Create a variable of type sthing - its the root object type[*]Assign the "getThingFromSetB" sthing to this variable[*]Compare each diamond to the sthing in an if statement to see which one was hit.[/LIST]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

kelbstar123 05-02-2018 08:43 AM

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


All times are GMT -5. The time now is 02:50 AM.

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