First. E.g.
A game contains a minigame, where the minigame is contained within its own room for good procedure, lets say its a video game inside of a room,
so you can go to the minigame from the room easily, however is there an easy function to return where you left off exactly?
player.ChangeRoom(player.PreviousRoom);
You should read through the complete manual at least once, also please use the forum search first.
Correct me if im wrong but doesn't that function return you to the room at the starting position which you're character is placed?
Quote from: manualPreviousRoom property
(Formerly known as character[].prevroom, which is now obsolete)
readonly int Character.PreviousRoom
Gets 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.
This is a read-only property. It is set automatically by ChangeRoom.
If the player coordinates change during the minigame, you need to store the previous coordinates in two global variables, then call
player.ChangeRoom(player.PreviousRoom, px, py);
Ahh, but the character wouldnt be facing the same way correct?
Not to be picky or anything, but logically that is true right? So we must have some sort of if case when the room loads in case the previous room is the mini game room im assuming right?
You can also store the direction, and then use the FaceRight module (or some easy code) to set it when you change room.
You can store the character.Loop and later set the character.Loop again.
Basically, everything about the player (and any character, object, et al) can be stored in a variable, and used later again.
Are you aware of the mini-game module? It uses a game restore to return back to the original game and state. There is a link to it in this thread.
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=34048.msg443220#msg443220
Wow, I didn't know that existed, RickJ. I could use that as well. :)