Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: eduarazo on Thu 04/12/2008 15:17:09

Title: Previous Room
Post by: eduarazo on Thu 04/12/2008 15:17:09
Hi,

Does anyone know if there's a function to set wich room the playable character comes from?
I ask this cause one of my rooms is a street, and it's possible to access from a house or from another part of the street. If the character comes from the house I want a door to close automatically, but not in the other case. Maybe it's also possible to act over the street room from the house room script...I don't know...
Title: Re: Previous Room
Post by: Khris on Thu 04/12/2008 15:39:58
player.PreviousRoom (http://www.adventuregamestudio.co.uk/manual/Character.PreviousRoom.htm)

This is no advanced question, and searching the forums or the manual would've answered this in seconds.
Title: Re: Previous Room
Post by: Gilbert on Thu 04/12/2008 15:44:40
Thanks for helping people out Khris, but please don't act like a moderator when you ar enot one. :P
Title: Re: Previous Room
Post by: Khris on Thu 04/12/2008 15:49:49
Alright, no problem:

RTFM!!

;)
Title: Re: Previous Room
Post by: eduarazo on Thu 04/12/2008 16:09:55
Excuse me, I read it but I don't know how to use this function for my purpose.
Title: Re: Previous Room
Post by: Akatosh on Thu 04/12/2008 16:53:01
You can't actually use that function to SET the player's previous room - only to GET it. Using it would look like this, for example:


if (player.PreviousRoom==5) player.Say("I have entered the house via the broken window.");


Also, have you bothered to read the scripting tutorial?