Player change room problem

Started by limeTree, Thu 22/01/2009 18:26:30

Previous topic - Next topic

limeTree

Hi,
I want to change the playing character and teleport to another room.
This is my code:

Code: ags
{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:

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


Matti

There can't be any command after the player.changeroom line, because the game immediately goes to the new room (like the errormessage says).

Pumaman

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.

SMF spam blocked by CleanTalk