Saturday, 28 May 2016

Class 64 - Dodge Effects

Post 146

Dodge Effects

So today I fixed a lot of the problems with the dodge roll. The most important fix is stopping the character from rolling out of control without being able to stop. So to do this I set up an alarm that turns off the variable "dodging" after a certain amount of time. I don't intend to keep this alarm in the game forever, this is because you have a limited amount of alarms per object. So later I will need to replace it so it doesn't use up one of my alarms.

As you can see in the screenshot above I added in the "alarm[4]=20".

Another thing I added to the dodge roll was a effect to make it more obvious that your character is moving fast and is immune to damage. To do this I made another object that doesn't have a sprite. Then in the create code I have it set its "Sprite_index" and "image_index" to the players current sprite and image index. The next thing I did was make this object spawn every second the player is dodging. The last step was making the object slowly fade away and destroy itself.
The end result is below.
Next class I will work on improving the dodge mechanic and deciding whether or not it will make you immune to damage or reduce it.

No comments:

Post a Comment