{"name":"hideObjectGlobal","operator":null,"title":"hideObjectGlobal","type":"command","url":"https://community.bistudio.com/wiki/hideObjectGlobal","revid":369350,"updated":"2024-09-03T18:43:03Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.12"}],"since":{"game":"arma3","name":"Arma 3","version":"1.12"},"arma3_since":"1.12","branch":null,"locality":{"argument":"global","effect":"global","server_exec":true},"exec":null,"description":"This command is designed for MP. Hides object on all connected clients as well as JIP. Can be used on static objects. In singleplayer this command behaves just like hideObject.","syntaxes":[{"syntax":"hideObjectGlobal object","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":"object to hide","types":["Object"],"since":null,"text":"object: Object - object to hide"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"object","types":["Object"]}},{"syntax":"object hideObjectGlobal hidden","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"object: Object"},{"name":"hidden","type":"Boolean","optional":false,"default":null,"description":"true → hidden; false → visible","types":["Boolean"],"since":null,"text":"hidden: Boolean - true → hidden; false → visible"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"object","types":["Object"]},"right":{"text":"hidden","types":["Boolean"]}}],"examples":[{"text":"```sqf\nhideObjectGlobal myObject; // hides myObject\nhideObjectGlobal nearestBuilding [2500, 2500, 0];\n```","code":["hideObjectGlobal myObject; // hides myObject\nhideObjectGlobal nearestBuilding [2500, 2500, 0];"]},{"text":"```sqf\nmyObject hideObjectGlobal true;    // hides myObject\nmyObject hideObjectGlobal false;    // shows myObject\n```","code":["myObject hideObjectGlobal true;\t// hides myObject\nmyObject hideObjectGlobal false;\t// shows myObject"]},{"text":"```sqf\n[myObject, true] remoteExec [\"hideObjectGlobal\", 2]; // remote-executes hideObjectGlobal from a client to the server\n```","code":["[myObject, true] remoteExec [\"hideObjectGlobal\", 2]; // remote-executes hideObjectGlobal from a client to the server"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["hideObject","isObjectHidden","deleteCollection"],"notes":[{"user":"DreadedEntity","date":"2015-06-27T18:14:00Z","text":"hideObject and hideObjectGlobal disable object collision in addition to rendering. **A3 1.45.131175**\n(tested by hiding buildings and running through, driving through, flying through, and shooting through where the building used to be)"},{"user":"Demellion","date":"2016-09-01T12:04:00Z","text":"As of **A3 1,62.134494** running **hideObjectGlobal** in big loop may cause some objects not to be hidden for a players already connected or passed **JIP**. To avoid players rendering desync consider running that in **preInit** schedule of a server."},{"user":"DrSova","date":"2017-08-07T12:44:00Z","text":"In **A3 1.72.142342** when you hide object via hideObjectGlobal, model sounds still be audible.\nFor e.g. if you delete apex house from map, you still hear a conditioner sound at this spot"},{"user":"Tankbuster","date":"2018-10-13T18:36:00Z","text":"Eventhandlers such as \"explosion\" will work on hidden objects"}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 1.12","Scripting Commands","Scripting Commands: Global Effect","Scripting Commands: Server Execution"]}