You mean something like this?
On space bar pressed
pick enemy where distance(player.x,player.y,enemy.x,enemy.y) < 100
enemy is playing animation "sword"
> enemy subtract from health 50
I may seem like a noob, but how can I get the Keyboard object? Is it avaliable on the free version? I think I need it to get "When spacebar is pressed".