Yeah, already readed docs.
GetSpriteObject() works only with
SetSprite().
So second attempt.
In SpriteEdit for all of your idle animations set
Event parameter (enter the text): for first frame to
FirstFrame, for last frame to
LastFrame.
Then in your actor script add such code:
on "FirstFrame"
{
this.LastFrame = false;
}
on "LastFrame"
{
this.LastFrame = true;
}
Then in scene.script:
on "LeftClick"
{
while (!actor.LastFrame)
}
Sleep(0) - cause of your animation's frame delay may be lower than any your entered here value and thus your may catch infinite loop.
For example, frame delay is 50 ms, and used Sleep(100);
While loop "sleeps" 100 ms, animation meantime plays last frame with delay 50 ms (ans sets
actor.LastFrame to true), and after that plays first frame with delay 50 ms (and sets
actor.LastFrame to false). So for the next loop's iteration (after 100 ms)
actor.Last frame will be false, again and again.