| This is the piece of code used for hitting the bar and taking their health down, the first part is calculating when it hits and how much the bullet subtracts then the other part is calculating the health to subtract from, in this picture I have the bullets take 1 from 100 but in the version now I have it take 10 from 100 to kill them faster, this has helped me as if later on when I want to make enemy health im gonna need this but would like to add it so the bullets of a percentage to hit more or less then base value. |