Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Baro on Sat 12/07/2008 16:11:07

Title: Diferent results skipping cutscene and not skipping? (SOLVED!)
Post by: Baro on Sat 12/07/2008 16:11:07
I have this script assigned to a region's standing event

function region1_Standing()
{
if (!steppedregion1)
{
   StartCutscene(eSkipESCOnly);
   player.Walk(300, 205, eBlock, eWalkableAreas);
   player.FaceCharacter(cSophie, eBlock);
   cSophie.Say("Come on, Pol. There's no time to lose.");
   cSou.Say("Actually, acording to my calculus, we can have a delay of 20 minutes maximum.");
   cBear.Say("No need to waste time anyway.");
   cSophie.Walk(130, 50, eNoBlock, eWalkableAreas);
   cSou.Walk(70, 50, eNoBlock, eWalkableAreas);
   cBear.Walk(100, 50, eBlock, eWalkableAreas);
   cSophie.FaceLocation(100, 240);
   cSou.FaceLocation(100, 240);
   cBear.FaceLocation(100, 240); 
   steppedregion1 = true;
   EndCutscene();
}
}

But when I test it, one of the characters (cSophie) ends up in different positions depending on whether I skip the cutscene or not.

(http://i225.photobucket.com/albums/dd67/Baro_tanuki/tanuki%20tail/a.png)
Without skipping the cutscente (what I want it to be)

(http://i225.photobucket.com/albums/dd67/Baro_tanuki/tanuki%20tail/b.png)
Pressing ESC to skip the cutscene. See how the character (the girl in red jumper) is in a different position.

Both positions are walkable areas.

How do I fix this?

Title: Re: Diferent results skipping cutscene and not skipping?
Post by: SSH on Sat 12/07/2008 17:02:30
It might help if we knew which script name the girl had...
Title: Re: Diferent results skipping cutscene and not skipping?
Post by: Khris on Sat 12/07/2008 17:25:53
He mentioned it: cSophie.

Baro:
You're using these lines:cSophie.Walk(130, 50, eNoBlock, eWalkableAreas);
   cSou.Walk(70, 50, eNoBlock, eWalkableAreas);
   cBear.Walk(100, 50, eBlock, eWalkableAreas);
to make the three characters walk simultaneously. The thing is, when a cutscene is skipped, every command is executed in "zero" time. Obviously, a non-blocking walk isn't really compatible with this method.

You need to look which character reaches their destination last if the cutscene isn't skipped, then make their walk blocking. This should fix it.
Title: Re: Diferent results skipping cutscene and not skipping?
Post by: Shane 'ProgZmax' Stevens on Sat 12/07/2008 18:01:57
I believe that while Wait() is skipped, the duration is observed, so you could also use that after the non-block calls to pop them to wherever they should be.
Title: Re: Diferent results skipping cutscene and not skipping?
Post by: Baro on Sat 12/07/2008 20:04:06
Quote from: KhrisMUC on Sat 12/07/2008 17:25:53
He mentioned it: cSophie.

Baro:
You're using these lines:cSophie.Walk(130, 50, eNoBlock, eWalkableAreas);
   cSou.Walk(70, 50, eNoBlock, eWalkableAreas);
   cBear.Walk(100, 50, eBlock, eWalkableAreas);
to make the three characters walk simultaneously. The thing is, when a cutscene is skipped, every command is executed in "zero" time. Obviously, a non-blocking walk isn't really compatible with this method.

You need to look which character reaches their destination last if the cutscene isn't skipped, then make their walk blocking. This should fix it.

it was cSophie, so made her block the script, and worked.
Thanks!