Maps

Started by Cpt Ezz, Tue 06/05/2008 11:07:06

Previous topic - Next topic

Cpt Ezz

 :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?

Khris

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 ;)).

Cpt Ezz

 ???
ok what i mean't was i want a map of the whole base that i'm in can i do that?

Creator

#3
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.

Code: ags

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:

Code: ags

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:

Code: ags

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).

Cpt Ezz

thanks i will give it a shot

SMF spam blocked by CleanTalk