Finalising the Dash
- Abbie Hipwell
- May 11, 2022
- 1 min read
Updated: Jun 15, 2022
Although the dash was working perfectly, we thought it would be a good idea to make this work based off the player's stamina. This would cut down on the UI which is needed, and also prevent the player from overusing the sprint and dash.
I added this small code into the dash blueprint, this checks that the stamina is above or equal to 5 before using it, if it is below this then the player is not able to dash

Each time the player dashes, five stamina will be taken away.

I hope that the dash is now finally complete and I won't have to add any more code or re-work this in any way, this has probably been one of the hardest mechanics I've had to do, mostly because I've had to constantly change aspects of it and think of new ways that I can make it better; it was particularly hard creating the function for the dash and using a timeline to create this. Although most versions are gone, below are a few screenshots of previous code, or ideas that I was trying out for the dash:
The original dash:

Attempting to create a better version of the dash; this is where I first began looking into vectors and the players location rather than focusing on the characters speed:

Comments