last room visited variable?

Started by miguel, Sun 15/06/2003 12:47:02

Previous topic - Next topic

miguel

hi there,
 I have a central room where all other rooms are acessed from there,
 what I want to know is if there's a way I can know what was the last room EGO visited,
 "If player has been to room" doesnt work because after a while the player has been to every rooms so if I make a "if" sequence it just counts the last one,

  I think I'll have to assign global ints to all the rooms and have them checked when EGO enters the central room, (the reason I need to know where EGO was is of positioning matters(x,y)),
   Is there an easier way or a diferent way of doing it?
thanks
   
Working on a RON game!!!!!

Scorpiorus

There is character[CHARID].prevroom variable you can apply.

if (character[EGO].prevroom == 4) {......}

-Cheers

miguel

great, thanks again Scorpioros! :)
Working on a RON game!!!!!

TerranRich

Yes, I too have such a central room (an elevator, in my case), and if it weren't for the prevroom variable, I would've had to code it myself.  :o

:)
Status: Trying to come up with some ideas...

miguel

yep, I was getting a bit frustrated but that "simple" variable will solve the case!!! :)
Working on a RON game!!!!!

SMF spam blocked by CleanTalk