Version 2.7 . Is this a bug?
Manual says regarding prevroom:
QuoteGets the room number that the character was previously in. If the character is still in the room that they started in, this will be -1. Otherwise, it will be the room number of the room that they were last in.
Now when cEgo starts in room 99, and I put Display("%d",cEgo.prevroom); in playerenters room before fadein,
it displays 99. Not -1.
I want to use this to put default debug code in rooms so I can just start in a room , and if prevroom==-1 have everything setup for testing.
Why not use:
if (DEBUG)
and CTRL-X to teleport to the room? debug mode enables the teleport and sets the #define DEBUG on
Sure I can, and have, made a work around. Point is that the debug code only runs if the character starts in the room. Anyway the bug report is the main issue here.
Good point, well spotted ... I think this was actually a mistake in the manual where I wrote that by accident ... but it would be handy to have so I'll update the code to match what the manual says.
Edit by strazer:
AGS v2.71 Beta 6:
* Fixed the player character's PreviousRoom property starting off as the first room number, rather than -1 as it said in the manual.