Wednesday, 8 June 2016

Class 72 - Even More Dodge Stuff

Post 153

Even More Dodge Stuff

So today I will work on fixing the dodge roll again. So I went back through the code and noticed I made the rookie mistake of writing in one of my variables completely wrong. I had put "Dodgingtimer" instead of "Dodgetimer". This caused some major problems and blew the game up. So I switched it around and corrected my mistakes to find out that the game now does this.


So not only was my variable wrong, the entire bit of code is wrong too. So now I have to go and figure out how to make this work.
So after some serious changes I can finally now say the dodge is working. The first thing I had to fix was the way "dodgeready" was changed to false. Originally I had it change to false whenever the timer wasn't at its 0 value. However this didn't actually work properly. So instead of having it control both aspects of the timer I now only have it control one. So "dodgeready" is set to false when the player hits spacebar instead. I also relocated the code from the previous post into the actual dodge script, which overall just makes more sense.


Here is the working script. Please ignore the labels by those numbers. The top number is "dodgetimer", and the second number is "dodgeready"
1 = True
0 = False

No comments:

Post a Comment