collisions with specific group of obj?

M

marvoc

Guest
Hello,
I have a player unit which can switch to another enemy unit when if collision is done. I'm using collision_circle to detect. But the issue what I have, that I have many types of enemies. So I can't set up the "object" name in syntax of collision_circle.

I would like to have something like
if (collision_circle && stealing == true) do something;
and put this variable "stealing" to all enemy instances.
Then put "stealing" to the "object" definition in collision_circle. Don't know if is it possible...
 
M

marvoc

Guest
Thanks a lot, it works perfectly. But now I have another issue.
Because I need to detect an "enemy" object which is in player collision (it could be many types).
Now I'm getting id only of one number, even if I'm in collision with different enemies :/
What I shoul do?

thank you
martin
 
B

bojack29

Guest
Are you trying to detect which enemy object it is how how many your in collision with?
 
M

marvoc

Guest
Maybye Im not understanding correctly, but Im using collision_circle and this should me return an instance id, but with parent obj it seems, it gives me its id, not id of childern.

Because from that id I want switch player instance to that collided enemy. Like stealing.
 
B

bojack29

Guest
Whoops, I meant **or** ^^^^

Even when you parent objects, using collision circle yields the childrens id.

It wouldnt make sense to capture the id of the parent object. What if the parent object does not exist in the room? It would throw an error.
 
Top