hideObjectGlobal: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|exec=" to "|serverExec=")
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
 
(42 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.12


|1.12|Game version=
|arg= global


|arg= global |Multiplayer Arguments=
|eff= global
|serverExec= server


|eff= global |Multiplayer Effects=
|gr1= Object Manipulation
|serverExec= server |Exec=
____________________________________________________________________________________________


| This command is designed for MP. Hides object on all connected clients as well as JIP. Call on the <u>server only</u>. Can be used on static objects. In SP this command behaves just like [[hideObject]].|DESCRIPTION=
|descr= 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]].
____________________________________________________________________________________________


| '''hideObjectGlobal''' object |SYNTAX=
|s1= [[hideObjectGlobal]] object


|p1= object: [[Object]] - object to hide |PARAMETER1=
|p1= object: [[Object]] - object to hide
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________


|s2= object '''hideObjectGlobal''' hidden |=  
|r1= [[Nothing]]


|p21= object: [[Object]]|PARAMETER21=
|s2= object [[hideObjectGlobal]] hidden


|p22= hidden: [[Boolean]] - [[true]]->hidden; [[false]]->visible|=
|p21= object: [[Object]]


|r2= [[Nothing]]|=
|p22= hidden: [[Boolean]] - [[true]] &rarr; hidden; [[false]] &rarr; visible
____________________________________________________________________________________________


|x1= <code>[[hideObjectGlobal]] [[nearestBuilding]] [2500,2500,0];</code> |EXAMPLE1=
|r2= [[Nothing]]
____________________________________________________________________________________________


|x2= <code>objectname [[hideObjectGlobal]] true;</code> |EXAMPLE2=
|x1= <sqf>hideObjectGlobal myObject; // hides myObject
____________________________________________________________________________________________
hideObjectGlobal nearestBuilding [2500, 2500, 0];</sqf>


| [[hideObject]], [[isObjectHidden]], [[deleteCollection]] |SEEALSO=
|x2= <sqf>myObject hideObjectGlobal true; // hides myObject
myObject hideObjectGlobal false; // shows myObject</sqf>


|x3= <sqf>[myObject, true] remoteExec ["hideObjectGlobal", 2]; // remote-executes hideObjectGlobal from a client to the server</sqf>
|seealso= [[hideObject]] [[isObjectHidden]] [[deleteCollection]]
}}
}}


<h3 style="display:none">Notes</h3>
{{Note
<dl class="command_description">
|user= DreadedEntity
<!-- Note Section BEGIN -->
|timestamp= 20150627181400
<!-- Note Section END -->
|text= [[hideObject]] and [[hideObjectGlobal]] disable object collision in addition to rendering. '''A3 1.45.131175'''
</dl>
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on June 27, 2015 - 18:14 (UTC)</dd>
<dt class="note">[[User:DreadedEntity|DreadedEntity]]</dt>
<dd class="note">
[[hideObject]] and [[hideObjectGlobal]] disable object collision in addition to rendering. '''A3 1.45.131175'''
(tested by hiding buildings and running through, driving through, flying through, and shooting through where the building used to be)
(tested by hiding buildings and running through, driving through, flying through, and shooting through where the building used to be)
</dd>
}}
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
{{Note
<dl class="command_description">
|user= Demellion
<dd class="notedate">Posted on September 1, 2016 - 12:04 (UTC)</dd>
|timestamp= 20160901120400
<dt class="note">[[User:Demellion|Demellion]]</dt>
|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.
<dd class="note">
}}
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.
</dd>
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
{{Note
<dl class="command_description">
|user= DrSova
<dd class="notedate">Posted on August 7, 2017 - 12:44 (UTC)</dd>
|timestamp= 20170807124400
<dt class="note">[[User:DrSova|DrSova]]</dt>
|text= In '''A3 1.72.142342''' when you hide object via [[hideObjectGlobal]], model sounds still be audible.  
<dd class="note">
In '''A3 1.72.142342''' when you hide object via [[hideObjectGlobal]], model sounds still be audible.  
For e.g. if you delete apex house from map, you still hear a conditioner sound at this spot
For e.g. if you delete apex house from map, you still hear a conditioner sound at this spot
</dd>
}}
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
{{Note
<dl class="command_description">
|user= Tankbuster
<dd class="notedate">Posted on October 13, 2018 - 18:36 (UTC)</dd>
|timestamp= 20181013183600
<dt class="note">[[User:Tankbuster|Tankbuster]]</dt>
|text= Eventhandlers such as "explosion" will work on hidden objects
<dd class="note">
}}
Eventhandlers such as "explosion" will work on hidden objects
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 11:23, 13 May 2022

Hover & click on the images for description

Description

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.
Groups:
Object Manipulation

Syntax

Syntax:
hideObjectGlobal object
Parameters:
object: Object - object to hide
Return Value:
Nothing

Alternative Syntax

Syntax:
object hideObjectGlobal hidden
Parameters:
object: Object
hidden: Boolean - true → hidden; false → visible
Return Value:
Nothing

Examples

Example 1:
hideObjectGlobal myObject; // hides myObject hideObjectGlobal nearestBuilding [2500, 2500, 0];
Example 2:
myObject hideObjectGlobal true; // hides myObject myObject hideObjectGlobal false; // shows myObject
Example 3:
[myObject, true] remoteExec ["hideObjectGlobal", 2]; // remote-executes hideObjectGlobal from a client to the server

Additional Information

See also:
hideObject isObjectHidden deleteCollection

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
DreadedEntity - c
Posted on Jun 27, 2015 - 18:14 (UTC)
hideObject and hideObjectGlobal disable object collision in addition to rendering. A3 1.45.131175 (tested by hiding buildings and running through, driving through, flying through, and shooting through where the building used to be)
Demellion - c
Posted on Sep 01, 2016 - 12:04 (UTC)
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.
DrSova - c
Posted on Aug 07, 2017 - 12:44 (UTC)
In A3 1.72.142342 when you hide object via hideObjectGlobal, model sounds still be audible. For e.g. if you delete apex house from map, you still hear a conditioner sound at this spot
Tankbuster - c
Posted on Oct 13, 2018 - 18:36 (UTC)
Eventhandlers such as "explosion" will work on hidden objects