float FrameTimer = 0.0f;///
int StartFrame = 1;///Start Frame Number
int EndFrame = 171;///End Frame Number
int Frame = StartFrame;
void Main()
{
if(Frame >= EndFrame)
{
iObjectStart(OBJ_22);///2nd Sprite
iObjectShow(OBJ_22);///2nd Sprite
iObjectHide(OBJ_0);///1st Sprite
}
FrameTimer += 30.0*(1.0f/60.0f);
if(FrameTimer >= 1.0f){Frame++;FrameTimer = 0.0f;}
OUT_4 = Frame;///Animation Frame
}
Add Two object and Linked them to the Script.
No comments:
Post a Comment