Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: limeTree on Thu 22/01/2009 18:26:30

Title: Player change room problem
Post by: limeTree on Thu 22/01/2009 18:26:30
Hi,
I want to change the playing character and teleport to another room.
This is my code:

{cJames.Say("Ok,i'll sleep!");
FadeOut(30);
Wait(40);
cBritneyM.SetAsPlayer();
player.ChangeRoom(3, 633, 307);
FadeIn(40);
   }


Instead,my game crashes after Fade out with an error that says:

::)Newroom:Cannot run this command,since there is a new room command already
queued to run.

Title: Re: Player change room problem
Post by: Matti on Thu 22/01/2009 19:05:09
There can't be any command after the player.changeroom line, because the game immediately goes to the new room (like the errormessage says).
Title: Re: Player change room problem
Post by: Pumaman on Thu 22/01/2009 19:23:35
Also, is the BritneyM character in the same room as the current player character? If not then the game will automatically change to her room and you can't do it manually.