I wanted both the player and the enemy to accumulate damage whenever they attack each other so I used the collide node but how do I make it so the player doesn't get damaged when they're punching. In short, how do I make the attack similar to the one in electrica?
you need to keep track of punching state if your character is in punching state then take no damage else take damage
Thanks for the reply but how do I implement that? It'd be easier if it was just code but I don't really get how to implement that using the given nodes. And I can't download the zip file
Use a state machine connected to your if collide. When hit start activate a state that has nothing connected or something else. When the hit end, send the signal back to the state machine to activate if collides.