Hello, this was my job:
create a script for every room (with the same name) that includes all the objects you want to disable, and insert it in the folder "scr" of the room, like this:
inter_obj.script
#include "scripts\base.inc"
var objArray =
new Array();
objArray[0] = "ticket";
objArray[1] = "pc_call";
objArray[2] = "monitor";
objArray[3] = "table";
objArray[4] = "door";
objArray[5] = "key";
objArray[6] = "photo";
objArray[7] = "tv";
objArray[8] = "exit_Init";
objArray[9] = "keyboard";
objArray[10] = "f9";
objArray[11] = "repeat";
objArray[12] = "phone";
var change_state;
change_state = true;
else change_state = false;
var i = 0;
{
i = i + 1;
}
create a script to be included in the folder "scripts" like this:
base_inter_obj.script
function f_base_inter_obj()
{
var separator =
new String("\ ");
separator = separator.
Substr(0,
1);
var inter_obj = "scenes" + separator + strScene + "\scr\inter_obj.script";
{
}
}
In the code, after the various calls that open and close the inventory, call the function this way
// or Game.InventoryVisible = true;
f_base_inter_obj();
Of course where you want to call the function use * #include "scripts\base_inter_obj.script" *.
All works perfectly but if, like me, you must hide all objects at the same time the way suggested by Azrael is much faster.
Simply create an Entity Region for every room (with same name) in the same size of the room and leave it hidden.
So two simple lines of code:
or
As you see, I use this way to use the special character * \ * to create the string of path:
var separator =
new String ("\ ");
separator = separator.
Substr(0.1);
Does anyone know if there is a different way such as the * ~ * before * " * ?