View Single Post
Super Moderator
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 04-30-2018, 04:46 PM

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:
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.

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

Mark Henwood
Reply With Quote