Ok, right now I have a button that returns true or false if being pushed. My character script checks if the button is true, then it plays two animations. When released, it should rewind them and stop them. Both animations use ClampForever. Now my question is, am I doing this correctly? Because right now, it doesn’t rewind the animations fully, only to about a frame after the start. I’ve tried to figure out a better way, but can’t. Anyone that can help? I’ll give you the code I have written…
//this is the character checking if the button was pressed or not
if( shootTouchPad.bPressed ) {
GunPlay();
isShootAnim = true;
Fire();
}
if( !shootTouchPad.bPressed ) {
GunStop();
isShootAnim = false;
}
//In Update(), I also have this running to sync the two animations
gunMain.animation["WingPoint 1"].normalizedSpeed = wingMain.animation["WingPoint 1"].normalizedSpeed;
//Here is the code in my GunStop function
function GunStop() {
wingMain.animation.Rewind();
gunMain.animation.Rewind();
yield;
yield;
yield;
wingMain.animation.Stop("WingPoint 1");
gunMain.animation.Stop("WingPoint 1");
}
If you need any more info, just ask
Thanks if you can help!
-Blayke ![]()