Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: RowenaTheWitch on Sun 24/09/2006 11:51:18

Title: Problems with the world map (SOLVED)
Post by: RowenaTheWitch on Sun 24/09/2006 11:51:18
I added a world map to my game: when the player looks at the inventory item "map" he/she is taken to a room where I've designed a map, and every point in the map takes you to a different room.
// script for Inventory item 11 (Mappa della citta'): Look at inventory item
player.ChangeRoom(17); 

My problem is: the map appears, but the inventory GUI is still open, and the player has to close it manually.
How can I close the inventory window automatically?
I've tried to add:
InvWindow.Visible=false;
to the room script of the map, in "Player enters room (before fadein)" but I get an error:
"must have an instance of the struct to access a non-static member"

What should I do?

EDIT
I tried to use : gInventory.Transparency = 100;
The inventory *seems* to disappear, but it's still there  ::)

EDIT 2
Resolved with gInventory.Visible=false;
Title: Re: Problems with the world map
Post by: GarageGothic on Sun 24/09/2006 12:06:27
Try putting instead:
gInventory.Visible = false;
Title: Re: Problems with the world map
Post by: RowenaTheWitch on Sun 24/09/2006 12:08:06
Thanks ^_^
We had the same idea at the same moment :=