Road TO Dev — Losing score

Rob Smith
2 min readAug 7, 2021

Objective: In order to have our score be more competitive let’s create a way for the player to lose score.

On the enemy script reduce score on player by your desired amount for me I am going to utilize random.range so that it doesn’t always hurt the player as much and it isn’t always the same every game. I am having this happen everytime an enemy gets past the player and respawns at the top.

Just make sure to make it be a negative to get the score to reduce. This is an easy thing to do and only requires the one step, but if done right adds a new challenge to the game!

Extra: I am going to have the player lose 5 points every time they lose a life, so sure they can utilize 1up’s and be more careless but it’ll effect their points!

--

--

Rob Smith

Hi there! I am currently on the path to learn how to become a unity developer and will be documenting my journey as best as I can here. Thanks for looking!