Dealing Damage

Hi

I have a series of bad guys (brains) that I want to do damage to good guys (bats). I'm performing a collision check for damage but I don't know how to narrow it down to that instance that is colliding with.

For example I'd lke to do this:
Brain instance cllides with Bat instance (collision event is on the brain object)
Brain instance deals damage to Bat instance and Bat instance deals damage to Brain instance

My problem is that I can't isolate which bat or which brain is colliding. Is there in Game Maker any kind of function like bat_instance = collider(brain_instance)?
 
N

Noba

Guest
Wouldn't other work?

For example with my bullet objects, I just do
Code:
 other.hp -= 1;
And that takes 1 hp off the other instance involved in the collision event, for example an enemy.
 
A

arirish

Guest
Wouldn't other work?

For example with my bullet objects, I just do
Code:
 other.hp -= 1;
And that takes 1 hp off the other instance involved in the collision event, for example an enemy.
Haha, yes. I'm not using the collision events, myself, so other. doesn't work in those cases.
 
Top