reveal: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(format)
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(59 intermediate revisions by 7 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|REVEAL]]
{{RV|type=command
[[Category:Scripting Commands OFP 1.96|REVEAL]]
[[Category:Scripting Commands OFP 1.46|REVEAL]]
[[Category:Scripting Commands ArmA|REVEAL]]


{{Command|= Comments
|game1= ofp
____________________________________________________________________________________________
|version1= 1.00


| ofp |= Game name
|game2= ofpe
|version2= 1.00


|1.00|= Game version
|game3= arma1
____________________________________________________________________________________________
|version3= 1.00


| Reveals a unit to a [[group]]. If ''toWhom'' is a unit, unit's group is considered. If ''toWhom'' is a vehicle, vehicle commander's group is considered. 
|game4= arma2
|version4= 1.00


<br><br>The [[knowsAbout|knowledge value]] will be set to the highest level any unit of the revealing side has about the revealed unit. If the revealing side has ''no'' knowledge about the revealed unit, the value will be set to 1.
|game5= arma2oa
|version5= 1.50


<br><br>Since ARMA 2 OA 1.60 the alternative syntax is available. Values greater than or equal 1.5 reveal the side of the unit, too.
|game6= tkoh
|version6= 1.00


<br><br>The knowledge level can only be increased, not decreased by this command.  |= Description
|game7= arma3
____________________________________________________________________________________________
|version7= 0.50


| toWhom '''reveal''' unitName |= Syntax
|arg= global


|p1= toWhom: [[Object]] or [[Group]]  which receives revealing information|= Parameter 1
|eff= local


|p2= unitName: [[Object]]  which is revealed |= Parameter 2
|gr1= Object Manipulation


| [[Nothing]] |= Return value
|descr= Reveals a target to a [[group]]. If ''toWhom'' is a unit, unit's group is considered. If ''toWhom'' is a vehicle, vehicle commander's group is considered.  The [[knowsAbout|knowledge value]] will be set to the highest level any unit of the revealing side has about the revealed target. If the revealing side has ''no'' knowledge about the revealed target, the value will be set to 1.
____________________________________________________________________________________________


|s2= toWhom '''reveal''' [unitName, accuracy] |=
{{Feature | informative | The knowledge level can only be increased by this command, not decreased. Use [[forgetTarget]] first if you need to decrease value.}}


|p21= toWhom: [[Object]] or [[Group]] which receives revealing information|= Parameter 1
|mp= [[targetKnowledge]] and [[knowsAbout]] information only get updated on the PC where this command was executed.


|p22= unitName: [[Object]] which is revealed |= Parameter 2
|s1= toWhom [[reveal]] target


|p23= accuracy: [[Number]] - knowledge value, clamped to 0...4 range |= Parameter 3
|p1= toWhom: [[Object]] or [[Group]] - which receives revealing information


|r2= [[Nothing]]|=
|p2= target: [[Object]] - which is revealed
____________________________________________________________________________________________
 
|x1= <code>_soldierOne reveal _soldierTwo; //soldierOne received information about soldierTwo</code> |= Example 1
|x2= <code>player reveal cursorTarget; //player receives information about the object below its cursor</code> |= Example 2
|x3= <code>_soldierOne reveal [_soldierTwo, 1.5];</code> |= Example 3
____________________________________________________________________________________________


| [[nearTargets]], [[knowsAbout]] |= See also
|r1= [[Nothing]]


}}
|s2= toWhom [[reveal]] [target, accuracy]
 
|s2since= arma2oa 1.60


<h3 style="display:none">Notes</h3>
|p21= toWhom: [[Object]] or [[Group]] - which receives revealing information
<dl class="command_description">
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on January 15, 2007
|p22= target: [[Object]] - which is revealed
<dt class="note">'''[[User:Ceeeb|Ceeeb]]'''
<dd class="note">In '''OFP v1.96''', When a target is revealed to a unit, it's knowsAbout rating is set to 1, unless it was already more than 1 in which case reveal does nothing. See [[knowsAbout]] for more details about knowsAbout ratings and limitations.


<dd class="notedate">Posted on January 24, 2008
|p23= accuracy: [[Number]] - knowledge value, clamped to 0..4 range
<dt class="note">'''[[User:Doolittle|Doolittle]]'''
<dd class="note">Use reveal to allow client to ''see'' a [[createVehicle|created vehicle]] faster - the associated menu interaction will become available therefore, like the player has option to get in sooner.


_tank = "M1A1" createVehicle (position player);
|r2= [[Nothing]]
player reveal _tank;
//get in user actions become available instantly


<dd class="notedate">Posted on January 15, 2012
|x1= <sqf>_soldierOne reveal _soldierTwo; // soldierOne knowsAbout information about soldierTwo is updated</sqf>
<dt class="note">'''[[User:kju|kju]]'''
<dd class="note">The same idea from Doolittle's note applies to beaming of units. If you [[setPos]] an unit or a player, reveal (all) nearby objects and vehicles to make the interaction possible a lot quicker.


<dd class="notedate">Posted on January 15, 2012
|x2= <sqf>player reveal cursorObject; // player knowsAbout information about object under cursor is updated</sqf>
<dt class="note">'''[[User:kju|kju]]'''
<dd class="note">Revealing a targetUnit will also add it to [[nearTargets]] database of the given sourceUnit. The quality/detail level of the info depends on the [[knowsAbout]] value used with reveal. More detail in the [[nearTargets]] page.


<!-- Note Section END -->
|x3= <sqf>_soldierOne reveal [_soldierTwo, 1.5];</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[nearTargets]] [[knowsAbout]] [[forgetTarget]] [[ignoreTarget]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dd class="notedate">Posted on October 21, 2014 - 15:37 (UTC)</dd>
 
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<dt><dt>
<dd class="notedate">Posted on 2007-01-15</dd>
<dt class="note">[[User:Ceeeb|Ceeeb]]</dt>
<dd class="note">In '''OFP v1.96''', When a target is revealed to a unit, its knowsAbout rating is set to 1, unless it was already more than 1 in which case reveal does nothing. See [[knowsAbout]] for more details about knowsAbout ratings and limitations.</dd>
 
<dt><dt>
<dd class="notedate">Posted on 2008-01-24</dd>
<dt class="note">[[User:Doolittle|Doolittle]]</dt>
<dd class="note">Use reveal to allow client to ''see'' a [[createVehicle|created vehicle]] faster - the associated menu interaction will become available therefore, like the player has option to get in sooner.
<sqf>
_tank = "M1A1" createVehicle (position player);
player reveal _tank;
// get in user actions become available instantly
</sqf></dd>
 
<dt><dt>
<dd class="notedate">Posted on 2012-01-15</dd>
<dt class="note">[[User:.kju|.kju]]</dt>
<dd class="note">The same idea from Doolittle's note applies to beaming of units. If you [[setPos]] an unit or a player, reveal (all) nearby objects and vehicles to make the interaction possible a lot quicker.</dd>
 
<dt><dt>
<dd class="notedate">Posted on 2012-01-15</dd>
<dt class="note">[[User:.kju|.kju]]</dt>
<dd class="note">Revealing a targetUnit will also add it to [[nearTargets]] database of the given sourceUnit. The quality/detail level of the info depends on the [[knowsAbout]] value used with reveal. More detail in the [[nearTargets]] page.</dd>
 
<dt></dt>
<dd class="notedate">Posted on 2014-10-21 - 15:37 (UTC)</dd>
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt>
<dd class="note">
<dd class="note">
Units that have been previously subjected to [[enableSimulation]] false; or [[enableSimulationGlobal]] false; may stay unrecognised for a long time even after simulation was re-enabled, returning [[objNull]] as [[cursorTarget]]. Force revealing units with [[reveal]] command usually solves the problem. For example: <code>{[[player]] [[reveal]] _x} [[forEach]] [[allUnits]];</code>
Units that have been previously subjected to [[enableSimulation]] false; or [[enableSimulationGlobal]] false; may stay unrecognised for a long time even after simulation was re-enabled, returning [[objNull]] as [[cursorTarget]]. Force revealing units with [[reveal]] command usually solves the problem. For example:
<sqf>{player reveal _x} forEach allUnits;</sqf>
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 19:42, 3 September 2024

Hover & click on the images for description

Description

Description:
Reveals a target to a group. If toWhom is a unit, unit's group is considered. If toWhom is a vehicle, vehicle commander's group is considered. The knowledge value will be set to the highest level any unit of the revealing side has about the revealed target. If the revealing side has no knowledge about the revealed target, the value will be set to 1.
The knowledge level can only be increased by this command, not decreased. Use forgetTarget first if you need to decrease value.
Multiplayer:
targetKnowledge and knowsAbout information only get updated on the PC where this command was executed.
Groups:
Object Manipulation

Syntax

Syntax:
toWhom reveal target
Parameters:
toWhom: Object or Group - which receives revealing information
target: Object - which is revealed
Return Value:
Nothing

Alternative Syntax

Syntax:
toWhom reveal [target, accuracy]
Parameters:
toWhom: Object or Group - which receives revealing information
target: Object - which is revealed
accuracy: Number - knowledge value, clamped to 0..4 range
Return Value:
Nothing

Examples

Example 1:
_soldierOne reveal _soldierTwo; // soldierOne knowsAbout information about soldierTwo is updated
Example 2:
player reveal cursorObject; // player knowsAbout information about object under cursor is updated
Example 3:
_soldierOne reveal [_soldierTwo, 1.5];

Additional Information

See also:
nearTargets knowsAbout forgetTarget ignoreTarget

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
Posted on 2007-01-15
Ceeeb
In OFP v1.96, When a target is revealed to a unit, its knowsAbout rating is set to 1, unless it was already more than 1 in which case reveal does nothing. See knowsAbout for more details about knowsAbout ratings and limitations.
Posted on 2008-01-24
Doolittle
Use reveal to allow client to see a created vehicle faster - the associated menu interaction will become available therefore, like the player has option to get in sooner.
_tank = "M1A1" createVehicle (position player); player reveal _tank; // get in user actions become available instantly
Posted on 2012-01-15
.kju
The same idea from Doolittle's note applies to beaming of units. If you setPos an unit or a player, reveal (all) nearby objects and vehicles to make the interaction possible a lot quicker.
Posted on 2012-01-15
.kju
Revealing a targetUnit will also add it to nearTargets database of the given sourceUnit. The quality/detail level of the info depends on the knowsAbout value used with reveal. More detail in the nearTargets page.
Posted on 2014-10-21 - 15:37 (UTC)
Killzone_Kid
Units that have been previously subjected to enableSimulation false; or enableSimulationGlobal false; may stay unrecognised for a long time even after simulation was re-enabled, returning objNull as cursorTarget. Force revealing units with reveal command usually solves the problem. For example: