Problems with the world map (SOLVED)

Started by RowenaTheWitch, Sun 24/09/2006 11:51:18

Previous topic - Next topic

RowenaTheWitch

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.
Code: ags
// 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:
Code: ags
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;

GarageGothic

Try putting instead:
Code: ags
gInventory.Visible = false;

RowenaTheWitch

Thanks ^_^
We had the same idea at the same moment :=

SMF spam blocked by CleanTalk