I'm trying to create a function that replicates a sword stab in this mini-project of mine. In my head, the code I have makes sense, but on execution, it is like the program isn't reading all of my code.
This is the code I have so far:
What it seems to be doing is just going so fast through the code that it just skips all animation and the "action = 1". However, it does take 1 second for the sword to disappear.
You can't see it from the code snippet I provided, but when action is set to 1, the character is unable to move. It works in all other instances of the game. I threw in the "8Direction" disabled for good measure, but it doesn't do anything either.
Any help would be greatly appreciated!