It's only weird because it happens pretty sporadically, but only when I'm using the singleplayer versions of two characters.
But when one fights the other, the one who doesn't have an instakill move at all kills the player who does.
Code for the instakill area:
#this is the receiving instakill code for the character with no instakill mechanic
#The sensei group is for the instakill
#The second part here is to ensure only the CPU is doing this to the player.
if area.is_in_group("sensei") and area.get_parent().is_in_group('player2'):
$AnimatedSprite.frames = PlayerDead
$AnimatedSprite.play("idle")
#ensures no damage can be done
$feet/CollisionShape2D.set_deferred("disabled", true)
#ensures no damage can be received
$Player1Head/CollisionShape2D.set_deferred("disabled", true)
is_dead = true
SPEED = 0
dead.play()
$OutOfBody.play()
GlobalPlayerStats.CPU_deaths += 1
GlobalPlayerStats.single_kills += 1
$KillTimer.start()
The area for the kill is just an area2d with a collisionshape, but in order for it to work, the player using the instakill puts it in the "sensei" group and then takes it out after the animation for it is finished (about 1 1/2 seconds). If anyone could give me some insight as to what's happening here, that'd be super cool.