Z
Zynpex
Guest
So, I have a basic scoring system, in the space shooter I'm making, when the bullet hits the enemy, if the hp is = or less than 0, the score is adjusted for the player, based on the score_value Var I set. I set a script for this, in the script is the following. The script is for Collision event with the player bullets to an enemy.
instance_destroy();
other.hp -= 1;
if (other.hp <= 0) {
score += other.score_value;
}
this works great, the only problem is the ship for the player shoots 2 bullets and if both bullets meet the target at the same time, and if it is destroyed then the player is granted double the points.
instance_destroy();
other.hp -= 1;
if (other.hp <= 0) {
score += other.score_value;
}
this works great, the only problem is the ship for the player shoots 2 bullets and if both bullets meet the target at the same time, and if it is destroyed then the player is granted double the points.