Hi,
I am struggling because I ve come up against something I cant solve using simple comparasons etc, I need to use the math library.
Ok, all I need to do is award another life when the score reaches 5000, 10000, 15000 etc. I can do this easily enough when the enemies have the same score value.eg. each enemy has a score of 100.
I can then simply do :
if currrentScore == 5000 then addthelife() end
The problem is that my enemies have different score values and the chances of hitting 5000, 10000, 15000 etc are remote.
I know I have too keep track of the current score and query the difference between the last score and the new score, if its over 5000 the award a new life.
But Iam struggling to get my head round it, I have the idea but implementing it is proving difficult.
So if anybody has an example any pointers it would be awesome.
Like I said my score variable is currentScore and to add a life I use a function called addLives().
thank you