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.
ahhhhhhhhhhhhhhhhhhh
ReplyDelete