LastRoomWas or something similar?

Started by iamlowlikeyou, Thu 27/01/2011 12:55:52

Previous topic - Next topic

iamlowlikeyou

I have a room that is reachable from several other rooms, but I'd like to to set different actions in function room_load() depending on which room player came from...

Is there a way to get which room player left to get to the current room?

Gilbert

You can use the player.PreviousRoom to check the player's last visited room.

Gudforby

You can use the Character.PreviousRoom command

if (cEgo.PreviousRoom == 1)
{
 //action
}

EDIT: arghh... beaten... :P

iamlowlikeyou

Ah, I couldn't find it...
That's exactly what I was looking for, thanks! :D

SMF spam blocked by CleanTalk