Wednesday, March 7, 2018

Day 19

Today I fixed the problem I was having last class with the hitbox.

All I had to do was make a "Draw End" event that made it so that whenever the drawing of the object finished, do this. So inside I made and instance_destroy code that destroys the hitbox whenever it finishes drawing.



So now it looks like this:
Now the next thing I have to do is make it so that the hitbox rotates with the player.
What I figured out worked was that I add a code in a "Draw Begin" event that said that its angle is equal to the mouse angle.



And now this is how it looks in the end 


Today I learned how to make the hitbox disappear after a certain time and make it follow the angle of the sword.

Tomorrow I will try to implement damage to my hitbox.

Tuesday, March 6, 2018

Day 18

Today I worked on my attack hitbox in my game.

I started out with doing the same thing as yesterday and tried to make a red box sprite that's the same size as the animation. After this I started coding in the attack state because that's where everything will be happening.

I added this code that made it so that it would create the hitbox.

What this does is that it creates the hitbox object in between the second and fourth animations (because it starts counting at 0)

Heres how it looks so far


It just creates hitboxes everywhere. 
I think I need to add a code to destory the hitbox after its done.

Unfortunately I ran out of time

Today I learned how to create an object during the animation.

Tomorrow I will continue work on the hitbox.

Monday, March 5, 2018

Day 17

Today I tried to implement a hitbox to my sword but ran into a big bug halfway through

So I watched a bit of this video to try to implement an attack into my game and i tried to follow it.

So I went to duplicate the sprite and then make the hitbox in that duplicate. But I accidentally made the hitbox on my main animation. So i thought it would be ok to just CTRL Z it. But nope. It appeared it was going good but as soon as I tried to launch the game I kept getting errors and I was like whats going on? Turns out the CTRL Z I did didn't actually bring back the sprites and the program crashed. So now I don't have my animation sprites anymore. Whoops.


So I tried to search project files for any trace of the sprites. And this is what I found:




I found the files hidden in a folder so I just dragged them back inside and tried to remake the sprite.

So I used all the pictures I could find and for some reason, the attack animation ingame is quicker than normal. I think the cause for that is that I'm missing a frame from the animation. But it really doesn't matter than much.

Today I learned how to solve an error and how I managed to recover some missing files.

Tomorrow I plan on continuing with my original plan for today, to implement a hitbox into the game.

Friday, March 2, 2018

Day 16

Today I tried to add a test dummy to my game so I could add damage to my sword attack and test if it works.

So I made a blue square sprite called spr_test_dummy and then I made an object called obj_test_dummy and and set it's sprite to that.


After this I tried to add some health to the object so that it could die.\
I made it inside the create event


Right now I am trying to think how I can approach this and make it so that when I attack it would reduce the damage.

Alright so I came up with an idea, I am going to use an object appears every time I attack and then destroys itself the frame after. 

I will make a hitbox object and thats what ill use.

Today I didn't learn much but I plan on doing more tomorrow.

Tomorrow I'll try to implement the hitbox and try to see if I can do damage.

Animate Lines and Ripple effect

Screenshot from Animate CC Animated GIF (Button does not work) Adobe Flash Player Version