Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Mugs on Sun 19/03/2006 02:03:21

Title: Object won't animate twice.
Post by: Mugs on Sun 19/03/2006 02:03:21
I made an object that would animate at different times according to a script.   The object animates the first time, but it doesn't the second.

This is my script:

Player enters room (Before fading)

object[0].SetView(3);Ã,  Ã,  Ã,  Ã, //Object 0 is set to View 3


Player enters room (After fading)

object[0].Animate(0, 2);Ã,  Ã,  Ã, //Object 0 is animating using "loop 0" with a delay of 2.Ã, 
object[0].Visible=false;Ã,  Ã,  Ã,  //Object 0 is now invisible.
gExample.Visible = false;Ã,  Ã, //GUI example turns off.
gOther.Visible = true;Ã,  Ã,  Ã,  Ã,  //GUI other turns on.
TypeLine("This is my script.");Ã,  Ã, //A line is being typed in gOther.
wait_click();Ã,  Ã,  Ã, Ã, Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, Ã,  //AGS awaits the player's click.
TypeLine("This is text");Ã,  Ã,  Ã, Ã,  Ã,  Ã,  Ã, //A line is being typed in gOther.
wait_click();Ã,  Ã,  Ã, Ã,  Ã, Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, //AGS awaits the player's click.
TypeLine("AGS is great!");Ã,  Ã,  Ã,  Ã,  //A line is being typed in gOther.
wait_click();Ã,  Ã,  Ã, Ã, Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, //AGS awaits the player's click.
object[0].Visible=true;Ã,  Ã,  Ã,  Ã, Ã,  Ã,  Ã,  Ã, //Object 0 is now visible.
object[0].Animate(2, 2);Ã,  Ã,  Ã,  Ã,  Ã,  Ã, //Object 0 should animate using loop 2 with a delay of 2.
SetBackgroundFrame(1);Ã,  Ã,  Ã,  Ã,  Ã, Ã, //Changes the background to frame 1
object[0].Animate(0, 2);Ã,  Ã,  Ã,  Ã,  Ã, Ã,  //Object 0 is animating using "loop 0" with a delay of 2.
object[0].Visible = falseÃ,  Ã,  Ã,  Ã,  Ã, Ã,  Ã, //Object 0 is now invisible.


When it gets to the second animation, the first frame of the loop appears, but it doesn't animate.Ã,  Ã,Â