- Home /
Count down number of moves as player-character makes movement from box to box. Please read details
Hello,
My player moves grid-to-grid horizontally and vertically and has only limited number of moves to get from start to finish.
I would like to display a move counter on screen which should decrease as the player-character moves on the grid. So ultimately, the game is over if the player can't reach the finish with in the possible number of moves.
Answer by CriticalAngleStudios · May 01, 2019 at 02:18 AM
Just simply make an integer that goes down by 1 every time the function is called to move the player, and if it hits 0, then call a function to load the GAME OVER screen or something.
Your answer
Follow this Question
Related Questions
How to track the amount of units a player has moved? 1 Answer
Do something every each multiple of 1000.. 2 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Making a bubble level (not a game but work tool) 1 Answer
how to make an object move like the one it is in contact(moving using Animator) with in unity? 1 Answer