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;
Try putting instead:
gInventory.Visible = false;
Thanks ^_^
We had the same idea at the same moment :=