I have a strange problem with delays. I write the following in the scripts:
PlayObjectAnimation("SlaveGob_1", "attack00", IDLE);
sleep (2)
But instead of waiting for two seconds (aren't those seconds?), this goblin, as if ignoring the bottom line, loops the animation without any visible delays. I need it to hit the ore, wait two seconds, and then hit it again, and so on, in a cycle endlessly.
Let's assume we create a separate function for the animation:
function goblin()
PlayObjectAnimation("SlaveGob_1", "attack00", IDLE);
sleep (2)
end
startThread(goblin)