Need help with a dialog problem.

Started by Flashback, Sun 30/07/2006 14:55:27

Previous topic - Next topic

Flashback

Hi, I'm having a small problem with a bit of my script in one of the rooms.
Here's how it should go:
Player enters a dark room and if he doesn't have a torch he says It's too dark to go on and goes back into the previous room.
Before reading on you should be aware that the player enters the dark room from the right, so he will be on the right hand side of the screen, and when he moves back into the previous room he needs to be on the left hand side.

I used the player.Changeroom(5, 50, 210) to make him move back to the previous room.
The problem is, the character moves to the co-ordinates 50, 210 before he moves back to the previous room, so while he is still in the dark room he shifts to the left of the screen while he is still talking and he doesn't change rooms until he finishes talking.

How can I make him change co - ordinates and room no at the same time?
I tried using the following so that it would wait until he has finished talking but it didn't work.

  RunDialog(10);
  if(player.Speaking){
    Wait(1);
  }
  else {
  player.ChangeRoom(5, 50, 210);
}

Please help  ???
The best advice I can give you is to always listen to the advice that people give you.

limeTree

Dont use run dialog but disply message(Edit message).
(A tip-if you want him to wait a sec before something,before new line or anything,the turn on the nex message incon and press "............" a little and it will be like a pause.)
(But dont use "",and be sure to set it on character to say,not letter box or it will be seen.)

Flashback

k, thanks for the help and the fast reply, lol, problem solved, thanks again. ;D
The best advice I can give you is to always listen to the advice that people give you.

Khris

Just for clarification: RunDialog(); isn't executed until after the current RunScript action has finished.

And like lipaoklipa said, use player.Say("blah"); instead.
Dialogs aren't necessary until you want to provide choices.

Flashback

Ahhhh... that makes sense because it seemed to ignore the dialog command and do the next commands before coming back to the dialog command.
Thanks for the clarification :)
The best advice I can give you is to always listen to the advice that people give you.

SMF spam blocked by CleanTalk