91
Technical forum / Problems with disabling the inventory
« on: June 29, 2007, 04:46:43 PM »
I have this little problem that I hope that someone can help me with. Try to follow me here:
To be able to disable the inventory in certain scenes I have done the following:
Changed the line in the data/scripts/game_daemon.script file which reads
to
Added the line
in data/scripts/base.inc.
Added the line
in data/scripts/game.script.
I then enabled/disabled the inventory by setting the global variable InventoryActive in the scene_init.script files.
So far so good. Then, in order to make the inventory slide down when an item is picked up, I added the following piece of code to game.script.
And modified the inventory-showing condition in game_daemon.script to:
The inventory slides down when an item is picked up now, BUT it overrides the enable/disable inventory settings. Is there a way around this?
Thanks in advance!
To be able to disable the inventory in certain scenes I have done the following:
Changed the line in the data/scripts/game_daemon.script file which reads
Code: [Select]
if(Game.Interactive && Game.MouseY < 45 &&! Game.ResponsesVisible &&! WinMenu.Visible) Game.InventoryVisible = true;
to
Code: [Select]
if(Game.Interactive && Game.MouseY < 45 &&! Game.ResponsesVisible &&! WinMenu.Visible && InventoryActive) Game.InventoryVisible = true;
Added the line
Code: [Select]
global InventoryActive;
in data/scripts/base.inc.
Added the line
Code: [Select]
InventoryActive = true;
in data/scripts/game.script.
I then enabled/disabled the inventory by setting the global variable InventoryActive in the scene_init.script files.
So far so good. Then, in order to make the inventory slide down when an item is picked up, I added the following piece of code to game.script.
Code: [Select]
method TakeItem(var ItemName)
{
// call the original method we have just overriden
this.TakeItem(ItemName);
global InventoryHint = true;
Sleep(1000);
InventoryHint = false;
}
And modified the inventory-showing condition in game_daemon.script to:
Code: [Select]
global InventoryHint;
if(InventoryHint;
(Game.Interactive && Game.MouseY < 45 && !Game.ResponsesVisible && !WinMenu.Visible))
The inventory slides down when an item is picked up now, BUT it overrides the enable/disable inventory settings. Is there a way around this?
Thanks in advance!