I'm new to godot, sorry if this is pretty easy.
My question is, how do I set up my enemy so that a collision box is only visible or only calls the sendHit() function to the player for a split second after the 3rd frame starts? Picture for ref: https://prnt.sc/WmA2kq3bDsjy
This is the collision box I'm trying to use: https://prnt.sc/OQgbp1tfWEVM. Sidenote- is there an easy way to flip a collisionbox or an entire kinematicbody2D? I just figured extending it to both sides would work because he's coded to always face the player.
Right now I have .75s timer that's turned on at the same time I switch to the attack animation. (3rd frame = .75s @ 4FPS) I've tried using this to set the collisionbox's collision and layer bits using a parent area2d, I've tried using a boolean 'hitting' variable so that the sendHit() only goes to the player if 'hitting' is true. I also start another timer when switching to the attack animation, about .85s, that just reverses whatever the first one did.
What method would you recommend to get this collisionbox to only send a signal if there's a collision for a specific split second during the animation?