- Home /
Question by
Marsallima · Feb 01, 2012 at 08:47 PM ·
animationfpsweaponworking
Stop animation and back to default location
"Stop animation and back to default location", example:
function StopReload(){
if(reloading){
animation.Rewind("Take 001");
CurrentBullets = LastCurrentBullets;
reloading = false;
}
}
Rewind not work correctly :/
Comment
Answer by vetcat · Feb 09, 2012 at 08:46 AM
function AnimationPlay(gameObj : GameObject, AnimationName : String) { gameObj.animation[AnimationName].speed=1.0; gameObj.animation[AnimationName].time=0; gameObj.animation.Play(AnimationName); }
function AnimationReverse(gameObj : GameObject, AnimationName : String) { gameObj.animation[AnimationName].speed=-1.0; gameObj.animation[AnimationName].time=gameObj.animation[AnimationName].length; gameObj.animation.Play(AnimationName); }
Your answer
Follow this Question
Related Questions
FPS Weapon and animation 1 Answer
Select Object ( Weapon ) Quick! Help! xD 1 Answer
Animation Not Playing 1 Answer
Cant assign animation to script 1 Answer