Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Pantxito on Fri 25/09/2009 16:58:04

Title: Problems with animation while running dialog (SOLVED)
Post by: Pantxito on Fri 25/09/2009 16:58:04
Hi every body, i have a problem with one of my scripts:

function hSalida_Talk()
{
cPantxito.Walk(270, 615, eBlock, eWalkableAreas);
cPantxito.Say("Holaaa!");
cPantxito.FaceLocation(37, 490, eBlock);
Wait(40);
cTrollazo.ChangeRoom(1, 76, 674);
cTrollazo.ChangeView(TROLLSALE);
cTrollazo.Animate(0, 5, eOnce, eBlock);
cTrollazo.ChangeView(TROLL);
cTrollazo.Say("QUE QUIERES DESGRACIADO?!");
dTroll.Start();
cTrollazo.ChangeView(TROLLENTRA);
cTrollazo.Animate(0, 5, eOnce, eBlock);
cTrollazo.ChangeRoom(2);
}



I want the script to stop when the dialog (dTroll) starts, and continue the script when the dialog ends.

Beacouse the game execute when the dialog its on this last part :

cTrollazo.ChangeView(TROLLENTRA);
cTrollazo.Animate(0, 5, eOnce, eBlock);
cTrollazo.ChangeRoom(2);
}




Title: Re: Problems with animation while running dialog
Post by: NsMn on Fri 25/09/2009 16:59:53
That's because Dialog.Start always waits until the script has ended. You will have to put the script after the dialog into the dialog script or dialog_request.
Title: Re: Problems with animation while running dialog
Post by: Pantxito on Sat 26/09/2009 16:39:48
Thank you the problem is solved.