Previous Room

Started by eduarazo, Thu 04/12/2008 15:17:09

Previous topic - Next topic

eduarazo

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...

Khris

player.PreviousRoom

This is no advanced question, and searching the forums or the manual would've answered this in seconds.

Gilbert

Thanks for helping people out Khris, but please don't act like a moderator when you ar enot one. :P

Khris

Alright, no problem:

RTFM!!

;)

eduarazo

Excuse me, I read it but I don't know how to use this function for my purpose.

Akatosh

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:

Code: ags

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


Also, have you bothered to read the scripting tutorial?

SMF spam blocked by CleanTalk