- Home /
How to make an animation finish after looping smoothly?
I'm making a simple level selection screen for my game and when you hover over a level number (OnMouseEnter) it plays an animation ("LevelSelect") and when you move away from it (OnMouseExit) it stops. It used to stop the animation at the frame it was last at but I fixed that by making an idle animation and crossfading the LevelSelect animation to it. It kind of works but it jumps back to the idle animation and I want it to smoothly finish the LevelSelect before going to idle. This isn't a big issue but I'm stuck for the moment on something else and should get this done.
Does that make any sense? Here's the part of my script that's handling the animations... Sorry in advance if This was a terrible way of scripting.
function OnMouseEnter(){
// Play anim
animation.CrossFade("LevelSelect");
}
function OnMouseExit(){
// Stop Anim
animation.CrossFade("IdleText");
animation.Stop("LevelSelect");
}
Sorry if this was confusing I wasn't sure how to word it. Thanks for any help!
SpaceBird_
Your answer
Follow this Question
Related Questions
Animation scripting. 1 Answer
Animation.CrossFade help please 3 Answers
Animation Crossfade won't play but Animation Play does 1 Answer
How to play an animation at least once before changing 2 Answers