hideObject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "Category:Scripting Commands ArmA2" to "Category:Scripting Commands Arma 2")
m (Text replacement - " +\] +" to "] ")
 
(40 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.06


|1.06|Game version=
|game2= arma2oa
|version2= 1.50


|arg= global |Multiplayer Arguments=
|game3= tkoh
|version3= 1.00


|eff= local |Multiplayer Effects=
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| Hide entity. Can be used on soldiers and vehicles, also on static objects. |DESCRIPTION=
|arg= global
____________________________________________________________________________________________


| '''hideObject''' object |SYNTAX=
|eff= local


|p1= object: [[Object]] |=
|gr1= Object Manipulation


| [[Nothing]] |RETURNVALUE=
|descr= Hide entity. Can be used on soldiers and vehicles, also on static objects.
____________________________________________________________________________________________


|s2= object '''hideObject''' hidden |=
|s1= [[hideObject]] object


|p21= object: [[Object]]|PARAMETER21=
|p1= object: [[Object]]


|p22= hidden: [[Boolean]] - [[true]]->hidden; [[false]]->visible|=
|r1= [[Nothing]]


|r2= [[Nothing]]|=
|s2= object [[hideObject]] hidden
____________________________________________________________________________________________


|x1= <code>[[hideObject]] unitName; </code>|EXAMPLE1=
|p21= object: [[Object]]
____________________________________________________________________________________________


|x2= <code>objectName [[hideObject]] true; </code>|EXAMPLE2=
|p22= hidden: [[Boolean]] - [[true]]->hidden; [[false]]->visible
____________________________________________________________________________________________


| [[isObjectHidden]], [[hideObjectGlobal]], [[deleteCollection]]  |SEEALSO=
|r2= [[Nothing]]


|mp= Command has local effect, needs to be run on each client. |=
|x1= <sqf>hideObject unitName;</sqf>
}}


<h3 style="display:none">Notes</h3>
|x2= <sqf>objectName hideObject true;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on July 15, 2010 - 20:00
<dt class="note">'''[[User:Shuko|Shuko]]'''
<dd class="note">This command will hide a unit, but he will still shoot enemies. Unit will be invisible, but weapon muzzle are visible.


<dt class="note">'''[[User:McHide|McHide]]'''
|seealso= [[isObjectHidden]] [[hideObjectGlobal]] [[deleteCollection]]
<dd class="note">Use MP framework to activate this comand on all players from server or any other maschine
}}
<code>_nic = [nil, mantohide, "per", rHideObject, [[true]] ] [[call]] RE; //In A3 use [[hideObjectGlobal]] instead.</code>


<dt class="note">'''[[User:Demonized|Demonized]]'''
{{Note
<dd class="note">you can use code as in example 2, where true = ON and false = OFF, if using it like in example 1, you can only turn it ON
|user= Shuko
|timestamp= 20100715200000
|text= This command will hide a unit, but he will still shoot enemies. Unit will be invisible, but weapon muzzle are visible.
}}


<dt class="note">'''[[User:DamonDaemon|DamonDaemon]]'''
{{Note
<dd class="note">using this locally causes the player/object disappear only locally; has to be executed serverside if used in MP. Hidden Vehicles still emit smoke/rotor blade dust and (probably) still emit engine sounds. Usefull for creating objects the map-creator doesn't want to be seen, like Units that protect a certain Area (like a safe-zone) against teamkillers or enemy units.
|user= McHide
|timestamp= 20110204081300
|text= Use MP framework to activate this command on all players from server or any other maschine
<sqf>_nic = [nil, mantohide, "per", rHideObject, true] call RE; // In A3 use hideObjectGlobal instead.</sqf>
}}


<dt class="note">'''[[User:neokika|neokika]]'''
{{Note
<dd class="note">The above comment is partially incorrect, if the effects of the command are local then it must be executed in every machine so it has global effect. If it is run only on the server machine, it will only be hidden on the server, while clients still see it.  
|user= DamonDaemon
|timestamp= 20120210063600
|text= Hidden Vehicles still emit smoke/rotor blade dust and (probably) still emit engine sounds.
Useful for creating objects the mission maker doesn't want to be seen, like Units that protect a certain Area (like a safe-zone) against teamkillers or enemy units.
}}


<dd class="notedate">Posted on March 5, 2014 - 16:25
{{Note
<dt class="note">'''[[User:Krycek CADelta|[CAD] Krycek]]'''
|user= Benargee
<dd class="note">As of today this now finally has a Global counterpart, just released on the Stable branch. Added it's link under See also.
|timestamp= 20141030055400
<!-- Note Section END -->
|game= arma3
</dl>
|version= 1.33
 
|text= When used on player, it only has an effect on third person mode. First person [[LOD]] is still visible.
<h3 style="display:none">Bottom Section</h3>
}}
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
 
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on October 30, 2014 - 05:54 (UTC)</dd>
<dt class="note">[[User:Benargee|Benargee]]</dt>
<dd class="note">When used on player, it only has an effect on third person mode. First person [[LOD]] is still visible. (A3 Dev 1.33)
</dd>
</dl>
<!-- DISCONTINUE Notes -->


<!-- CONTINUE Notes -->
{{Note
<dl class="command_description">
|user= DreadedEntity
<dd class="notedate">Posted on June 27, 2015 - 18:14 (UTC)</dd>
|timestamp= 20150627181400
<dt class="note">[[User:DreadedEntity|DreadedEntity]]</dt>
|game= arma3
<dd class="note">
|version= 1.45
[[hideObject]] and [[hideObjectGlobal]] disable object collision in addition to rendering. '''A3 1.45.131175'''
|text= [[hideObject]] and [[hideObjectGlobal]] disable object collision in addition to rendering.
(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 -->
<dl class="command_description">
<dd class="notedate">Posted on January 26, 2016 - 22:34 (UTC)</dd>
<dt class="note">[[User:Bloodwyn1756|Bloodwyn1756]]</dt>
<dd class="note">
Sometimes it´s easier to teleport the object about 100m under the ground (also JiP Support):
<code>_obj setPosATL [getPosATL _obj select 0, getPosATL _obj select 1, (getPosATL _obj select 2)-100];</code>
And to unhide:
<code>_obj setPosATL [getPosATL _obj select 0, getPosATL _obj select 1, (getPosATL _obj select 2)+100];</code>
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 17:49, 8 November 2023

Hover & click on the images for description

Description

Description:
Hide entity. Can be used on soldiers and vehicles, also on static objects.
Groups:
Object Manipulation

Syntax

Syntax:
hideObject object
Parameters:
object: Object
Return Value:
Nothing

Alternative Syntax

Syntax:
object hideObject hidden
Parameters:
object: Object
hidden: Boolean - true->hidden; false->visible
Return Value:
Nothing

Examples

Example 1:
hideObject unitName;
Example 2:
objectName hideObject true;

Additional Information

See also:
isObjectHidden hideObjectGlobal 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
Shuko - c
Posted on Jul 15, 2010 - 20:00 (UTC)
This command will hide a unit, but he will still shoot enemies. Unit will be invisible, but weapon muzzle are visible.
McHide - c
Posted on Feb 04, 2011 - 08:13 (UTC)
Use MP framework to activate this command on all players from server or any other maschine
_nic = [nil, mantohide, "per", rHideObject, true] call RE; // In A3 use hideObjectGlobal instead.
DamonDaemon - c
Posted on Feb 10, 2012 - 06:36 (UTC)
Hidden Vehicles still emit smoke/rotor blade dust and (probably) still emit engine sounds. Useful for creating objects the mission maker doesn't want to be seen, like Units that protect a certain Area (like a safe-zone) against teamkillers or enemy units.
Benargee - c
Posted on Oct 30, 2014 - 05:54 (UTC)

When used on player, it only has an effect on third person mode. First person LOD is still visible.

DreadedEntity - c
Posted on Jun 27, 2015 - 18:14 (UTC)

hideObject and hideObjectGlobal disable object collision in addition to rendering. (tested by hiding buildings and running through, driving through, flying through, and shooting through where the building used to be)