Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Cpt Ezz on Tue 06/05/2008 11:07:06

Title: Maps
Post by: Cpt Ezz on Tue 06/05/2008 11:07:06
 :o

i was just wondering is there a way to make a plaque of panel that when i look at it displays a map of the place im in?
Title: Re: Maps
Post by: Khris on Tue 06/05/2008 12:42:55
There are several ways even.
You can check the current room using player.Room.

Without you being a bit more specific, I can't tell you much else, except that these kinds of questions more or less answer themselves after one gets a bit more familiar with AGS (hint, hint ;)).
Title: Re: Maps
Post by: Cpt Ezz on Tue 06/05/2008 23:27:15
 ???
ok what i mean't was i want a map of the whole base that i'm in can i do that?
Title: Re: Maps
Post by: Creator on Wed 07/05/2008 07:59:03
I think what KhrisMUC suggested would work fairly good.

Create a new room as your map. Considering in your last post you said that you're in a 'base', I'm guessing it's some kind of building that you can enter. In the room you created as your 'map' make sure the player visibility property is switched to 'false' (this will make the character invisible in the map room). When you click on your map option from the main game use the 'ChangeRoom' function to go to the map room.


player.ChangeRoom(5); //Where 5 is the room you made a map


In the room that is you map put this in the 'player enters room before fadein' function:


if (player.PreviousRoom == 3) { //say room 3 is the bottom floor
  oCursor.SetPosition(x, y); //Where oCursor is your object showing where you are and x and y are where the cursor should be considering on the room.
}


this would make your cursor appear on the map screen's 'bottom floor' showing where you are.
When you want to exit the map screen just put:


player.ChangeRoom(player.PreviousRoom);


I hope this helps and I hope that I didn't make any mistakes (I haven't created a map screen ever in AGS, but this is the easiest way I could think of).
Title: Re: Maps
Post by: Cpt Ezz on Wed 07/05/2008 08:19:01
thanks i will give it a shot