Kinda
You could do a timeout but it's not a good choice.
For example
HTML Code:
function onCreated() {
setTimer(0.05);
}
function onTimeout() {
if (condition1) temp.canswing = true;
if (player.ani != "swim") temp.canswing = true;
if (player.dead == false) temp.canswing = true;
if (keydown(5) && temp.canswing) {
setani("sword", "");
} else {
setani("idle", "");
}
setTimer(0.05);
}