speed settings in cut scenes

Started by spook1, Thu 18/08/2005 21:00:09

Previous topic - Next topic

spook1

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

Gilbert

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.

spook1

Aaaah, how stupid.
yet still the whole scene is over in a wink.
What am I missing?

Gilbert

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

spook1

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

strazer

Try putting a
  Wait(1);
just before the FadeIn call.

SMF spam blocked by CleanTalk