Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: spook1 on Thu 18/08/2005 21:00:09

Title: speed settings in cut scenes
Post by: spook1 on Thu 18/08/2005 21:00:09
I go to new room and have the following code.
everything happens in a blink though?
How can I slow it down and get a view of my character walking towards the spaceship, fade out and see the ship gently fly away...?

Code:
// room script file

#sectionstart room_a  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
  // script for Room: Player enters screen (before fadein)
ObjectOn(0);
player.x = 163;
player.y = 135;
}
#sectionend room_a  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart room_b  // DO NOT EDIT OR REMOVE THIS LINE
function room_b() {
  // script for Room: Player enters screen (after fadein)
character[EGO].SetWalkSpeed(1, 1);
character[EGO].Walk(163, 135, eBlock);

FadeOut(70);
ObjectOff(0);
ObjectOn(1);
player.x = 500;
player.y = 500;
FadeIn(100);
object[1].Move(239,37, 1, eBlock);

FadeOut(10);
NewRoom(16);
}
#sectionend room_b  // DO NOT EDIT OR REMOVE THIS LINE
Title: Re: speed settings in cut scenes
Post by: Gilbert on Fri 19/08/2005 02:06:53
Is EGO the same as player when that room start?
If yes, why would you first set his coordinates to (163, 135) and then have him walk to that same coordinates? He's not even goint to move.
Title: Re: speed settings in cut scenes
Post by: spook1 on Fri 19/08/2005 09:44:19
Aaaah, how stupid.
yet still the whole scene is over in a wink.
What am I missing?
Title: Re: speed settings in cut scenes
Post by: Gilbert on Fri 19/08/2005 09:50:34
Himm since I'm not seeing the room itself and I don't know much about your game's setting, I can't make much comment. But you may try putting in Display() lines to check if the script runs at all. Like:

#sectionstart room_b  // DO NOT EDIT OR REMOVE THIS LINE
function room_b() {
  // script for Room: Player enters screen (after fadein)
  Display("1");
  character[EGO].SetWalkSpeed(1, 1);
  character[EGO].Walk(163, 135, eBlock);
  Display("2");
  FadeOut(70);
  ObjectOff(0);
  ObjectOn(1);
  player.x = 500;
  player.y = 500;
  Display("3");
  FadeIn(100);
  object[1].Move(239,37, 1, eBlock);
  Display("4");
  FadeOut(10);
  NewRoom(16);
}
#sectionend room_b  // DO NOT EDIT OR REMOVE THIS LINE
Title: Re: speed settings in cut scenes
Post by: spook1 on Fri 19/08/2005 11:35:15
Thanx, that helped a lot.
Almost everything works fine now, expet for the fact that the character and object(0) are not hidden when the fadein is finished again.
i see obejct 1 and player, then a fade out, then a fadin and again object 0 and player and only after that object(0) and player disappear and object (1) is shown.

Why is this? How can I block the events and only after that dothe fadein again?

regards,

martijn
Title: Re: speed settings in cut scenes
Post by: strazer on Sun 21/08/2005 00:31:00
Try putting a
  Wait(1);
just before the FadeIn call.