There is this part in my game where the character is driving around in a car. I want to disable everything except look and walk icons. Is there a way to disable the inventory icon for that screen and enable it again after the player leaves the screen?
I think what you want is 'DisableCursorMode', since I have no clue as to what style game you are creating.
You could also need 'GuiOff'
Depending on what type of interface you are using, look up each one in the ags manual for more information.
I used DisableCursormode but that does not stop the player from clicking on the inventory button and opening and looking at the inventory. I tried using GUIOff(2) to disablr the inventory, but it doesn't work, as the inventory still opens when the player clicks the button
Okay, then, you need to either post some screenshots that will help us, or please give a good description, or a good example game thats like it.
Use a globalint to track whether a GUI should be active. Say, for example, I'll use globalint 5 here.
When you want the GUI to be disabled, just do something like:
SetGlobalInt(5,1);
In the interfaceclick script, where it described something like clicking on the button to bring up the GUI, it would be something like:
GUIOn(Whatever);
Instead, put it into a if statement:
if (GetGlobalInt(5)==0) GUIOn(whatever);
At points where you want the GUI to be enabled again, just do:
SetGlobalInt(5,0);