Disabling Inventory

Started by Babar, Thu 04/09/2003 18:33:17

Previous topic - Next topic

Babar

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?
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

Scummbuddy

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.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Babar

#2
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
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

Scummbuddy

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.
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Gilbert

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:
Code: ags

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:
Code: ags

GUIOn(Whatever);

Instead, put it into a if statement:
Code: ags

if (GetGlobalInt(5)==0) GUIOn(whatever);


At points where you want the GUI to be enabled again, just do:
Code: ags

SetGlobalInt(5,0);

SMF spam blocked by CleanTalk