So what I'd like to have happen is....
If the player hit the left arrow key during an attack within the attack time window, the enemy they hit will be moved one cell to the left on the grid.
If the player hit the right arrow key during an attack within the attack time window, the enemy they hit will be moved one cell to the right on the grid.
If the player hit the up arrow key during an attack within the attack time window, the enemy they hit will be moved one cell back on the grid.
All of this assuming the cell they would be moved to exists, and isn't already occupied.
What I can't seem to figure out is how to do this in the schematic. I figure you'd need to get the enemy's current position and then add or subtract from that cells row/column position based on the key the player hit to get the new position.
Here's what my schematic currently looks like. I have the inputs set up, and they log to the console fine if hit, but currently the best I can do is get the enemy to run completely off screen when they are hit instead of going to a controlled position on the grid.
https://ibb.co/VWzNj9L
Thanks.