Returning to Previous / Last Room Player was in

Started by barefoot, Fri 26/03/2010 18:35:59

Previous topic - Next topic

barefoot

Hi

I have a 'Room' (actually a symbols chart) that the player can acess from any room by clicking a text hotpot, so I am trying to find latest Code to return player to the very last room he was in. I don't want to have to create lots of the same room.

I checked out PreviousRoom property etc but thats not whatI'm looking for.

any help would be appreciated.

barefoot

I May Not Be Perfect but I Have A Big Heart ..

Khris

How is it not?
  player.ChangeRoom(player.PreviousRoom);

barefoot

Quote from: Khris on Fri 26/03/2010 19:03:44
How is it not?
  player.ChangeRoom(player.PreviousRoom);



Because all I found in manual under PreviousRoom was:

Code: ags

Display("EGO's previous room was %d.", cEgo.PreviousRoom);


just shows a display....

Cheers anyway Khris

barefoot
I May Not Be Perfect but I Have A Big Heart ..

JD

The entry in the manual is just an example of how PreviousRoom can be used. Khris´ code is just what you need  :)

Matti

A variable is a variable, no matter which way it's used. Many examples in the manual contain the display command, don't let that confuse you.

SMF spam blocked by CleanTalk