Crone collides with crone

I would like to make a shooting game with “pirate mate” and “bullet”.
crones of pirate mate and bullet will be created But I cannot make them interaction between the crones.
Please help.

What I would do is use lists to store a list of cloned bullets and pirates.

First, start with two empty lists:

When a pirate is created, add it to the list:

Then, instead of using

, we can use . This second variant triggers when the first item collides with any other item. However, we get anotherItem as a variable and we can use it within our code like so:

What this says is, “When the bullet collides with any object, check if the hit object is within the list of pirates. If the hit object is on the list of pirates, do something.”

2 Likes