Hey,
So I have a bullet setup that will destroy itself upon collision with an enemy and enemyHP will decrease as per the damage variable on the bullet. Works fine. No problem.
My issue:
I want to have a second kind of bullet that fires from a certain tower (This part is working fine) but I want the bullet to pass through the enemy and continue for approximately a second..
I moved the code to destroy itself so now it registers an alarm and when the alarm triggers it destroys itself. That is fine. The bullet passes through enemies, fine BUT it 'hits' them multiple times for the duration of colliding with the enemy... I'm trying to figure out how to just get it to damage once...
In the collision with objBullet
if (!hit)
{
currentHp = currentHp - pain;
}
This was my initial thinking... I just need to get the hit to turn true and false properly...
In the step event
if (place_meeting(x,y, objBullet))
{
hit = true;
}
hit = false;
This was what I was thinking was going to work but it doesn't yet.
So I want it to tell itself not to take damage if its already been hit but it still just takes as much damage as it it colliding... I again think this is just something simple that i'm just missing but I am a tiny bit stuck right now -.- Any ideas? I can't find a 'collision start' or 'collision end' event to use, I figured place_meeting would work to check for collisions ? I dunno though
Many Thanks,