Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: ------ on Wed 20/12/2006 14:01:18

Title: Look an object and come back to the same room
Post by: ------ on Wed 20/12/2006 14:01:18
I want to do that if my character look an object in the inventory or in the GUI the game open a new room or a window with some information. When the character close this window  or room the character have to come back to the room where he looks this object. He can looks this object in all the rooms of the game.

For example, if the player wants to look a book in the inventory in anywhere for search an information in this book, how can I do that?

Thanks and sorry for my english!

Title: Re: Look an object and come back to the same room
Post by: SSH on Wed 20/12/2006 14:05:14
In the objects' inventory interaction (look at):

player.ChangeRoom(ROOM_NUMBER_OF_THE_BOOK);

and in the interaction of the book's "Quit" hotspot...

player.ChangeRoom(player.PreviousRoom);

Title: Re: Look an object and come back to the same room
Post by: ------ on Thu 21/12/2006 13:54:45
Ok, the problem is solved.

Thanks for your help!  ;)