Picking up items in the game does not work. I can't pick up two objects at the same time

I have two diamonds in the game, I want to make them both pickable. But when I run the attached code, only one of them comes up. How can I fix this? I plan to use a lot of diamonds, so I can’t create a separate tab for each one.


Hi @Andrew!

Your code does not work because the subject “Dog” is used for more than one time for a collision function. For convenience, I suggest using the “when item collides with anotherItem” function instead. Attached is my method to solve the problem.

You can remix my CoSpace to understand the code. Hope this helps. :slight_smile:

Regards,
NixonLiStudentAccount X CoRichardLi :heart:

3 Likes

Thank you very much! It worked :slight_smile:

1 Like