Now that you have assigned an object with its starting point value, it is time to do a basic set of calculations so that when the player presses a particular key, the movement points will reduce.
Following are the things you need to do:
Set the Current Movement Value to the same value as the starting movement value.
Set the Current starting value to the counter object. This allows you to keep a real-time view of the movement points decreasing.
Check for when the keyboard is pressed and reduce the current movement value by 1.
To ensure that the counter is correct at all times, you must create a condition that sets the counter to the current value when a specific key is pressed.
At the beginning ...