Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: fitbo on Thu 19/10/2006 14:19:33

Title: character change to previous room
Post by: fitbo on Thu 19/10/2006 14:19:33
Hey,

I'm having a little problem with the change room command. The player finds a letter in the game. If he looks at it in the inventory screen, the player changes the room, where he can read the letter(the letter is the background of the room). After he's done reading it, I want that the player changes to the room he was previously in, but I don't know how. With the change room command I can only choose a specific room, but not the room from where the player actually looked at the letter in the inventory screen. Maybe I missed sth, but what?

Thanx for you help
Title: Re: character change to previous room
Post by: Gilbert on Thu 19/10/2006 14:40:41
If you use text scripting:

cEgo.ChangeRoom(cEgo.PreviousRoom);
Title: Re: character change to previous room
Post by: SSH on Thu 19/10/2006 14:56:16
or


player.ChangeRoom(player.PreviousRoom)


if your character's script name is something other than the default... ;)