Hi everyone, I’m making a top down shooter where the Player is rewarded more points the faster they can kill the Enemy. I’m open to any way that this can be set up and it work, my failed attempt thus far has gone like this:
For each instance of Enemy, if Enemy_Health is greater than or equal to 100, the timer called “EnemyAliveScoreTimer” is reset.
The score starts at it’s highest number and decreases every 0.5 seconds until we get to 31 seconds.
At which point, the score for killing them only = 1.
I have a seperate Repeat for each instance event for each of these and for example, they go like this;
Repeat for each instance of Enemy: Condition is - The timer “EnemyAliveScoreTimer” of Enemy is greater than 1.5 seconds, Trigger once and Action is - Change the variable "EnemyAliveScore of Enemy: set to 944.
When the variable Enemy_Health is less than or equal to 0, I have a boolean variable called EnemyDead which is set to false by default but it is set to true when Enemy_Health = 0 as the Enemy is now dead.
I then say in a seperate Repeat for each instance of Enemy event, if the boolean value of EnemyDead is set to true and Trigger once then in the action for this event - Pause the timer “EnemyAliveScoreTimer” and change the Enemy variable EnemyAliveScore to Enemy variable EnemyDeadScore.
I then planned on adding the dead scores together to make a total score which would be the scene variable but as getting this far has yet to work for me, I haven’t gotten that far unfortunately as I cannot get EnemyDeadScore to change to anything from 0 and I cannot figure out why.
I’ve tried making it so that the Enemy object is not deleted when the Enemy variable Enemy_Health hits 0 but that didn’t make a difference. Neither did not using the booleans and being more direct and saying that when the variable Enemy_Health was less than or = 0 then EnemyAliveScore was set to and even added in a different trial to EnemyDeadScore but in both cases, EnemyDeadScore was still = 0. I have a couple of text objects in the scene that show each of them and outside of debugger that’s how I’ve been keeping track.
If anyone can help me solve this that would be amazing cause I’m totally puzzled why this won’t work. I’m going to try and add a few pictures to a post for the first time so I apologise if I cannot post more than 1 picture.