setFace: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)\]\]" to "{{GameCategory|arma3|Scripting Commands}}")
m (Text replacement - "{{Link|:Category:" to "{{Link|Category:")
 
(47 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| ofp |Game name=
|game1= ofp
|version1= 1.00


|1.00|Game version=
|game2= ofpe
|version2= 1.00


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


|eff= local |Multiplayer Effects=
|game4= arma2
|version4= 1.00


|gr1= Unit Identity |GROUP1=
|game5= arma2oa
____________________________________________________________________________________________
|version5= 1.50


| Set person's face. For a list of available faces, check [[:Category:CfgIdentities]]. |DESCRIPTION=
|game6= tkoh
____________________________________________________________________________________________
|version6= 1.00


| person '''setFace''' face |SYNTAX=
|game7= arma3
|version7= 0.50


|p1= person: [[Object]] |PARAMETER1=
|arg= global


|p2= face: [[String]] |PARAMETER2=
|eff= local


| [[Nothing]] |RETURNVALUE=
|gr1= Unit Identity
____________________________________________________________________________________________
 
|x1= <code>soldier1 [[setFace]] "WhiteHead_02"</code> |EXAMPLE1=
|x2= Set persistent face for a unit in MP<code>[[if]] ([[isServer]]) [[then]] {[_unit, "AsianHead_A3_02"] [[remoteExec]] ["setFace", 0, _unit]};</code>|=
____________________________________________________________________________________________


|[[face]], [[setIdentity]], [[setSpeaker]] |SEEALSO=
|descr= Set person's face. For a list of available faces, check {{Link|Category:CfgIdentities}} or {{hl|CfgFaces}} config.
If the face is non-existent, the face is set to 'Default' and the error is logged in the [[Crash Files|.rpt file]].


{{Columns|3|
* {{Link|Operation Flashpoint: CfgIdentities#Faces|{{ofp}} faces}}
* {{Link|ArmA: Armed Assault: CfgIdentities#Faces|{{arma1}} faces}}
* {{Link|Arma 2: CfgIdentities#Faces|{{arma2}} faces}}
* {{Link|Arma 3: CfgIdentities#Faces|{{arma3}} faces}}
* {{Link|Take On Helicopters: CfgIdentities#Faces|{{tkoh}} faces}}
}}
}}


<h3 style="display:none">Notes</h3>
|s1= person [[setFace]] face
<dl class="command_description">
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on unknown
|p1= person: [[Object]]
<dt class="note">unknown
<dd class="note">
For '''Arma 2''' the face value is a string from ''Face01'' to ''Face107''. Camo faces are available as well, 6 per face.  For example the full set of class names for face value 77 would be:
  Face77, Face77_camo1, Face77_camo2, Face77_camo3, Face77_camo4, Face77_camo5 and Face77_camo6
----
* [http://www.ofpec.com/forum/index.php?topic=33444.0 a full list of Arma 2 faces]
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>
|p2= face: [[String]]
[[Category:Scripting Commands|SETFACE]]
 
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
|r1= [[Nothing]]
[[Category:Scripting Commands OFP 1.96|SETFACE]]
 
[[Category:Scripting Commands OFP 1.46|SETFACE]]
|x1= <sqf>soldier1 setFace "WhiteHead_02";</sqf>
{{GameCategory|arma1|Scripting Commands}}
 
{{GameCategory|arma2|Scripting Commands}}
|x2= Set persistent face for a unit in multiplayer:
{{GameCategory|arma3|Scripting Commands}}
<sqf>this setFace "AsianHead_A3_02"; // in the init field if the unit already exists in Eden Editor</sqf>
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
 
<sqf>
if (isServer) then { [_unit, "AsianHead_A3_02"] remoteExec ["setFace", 0, _unit] };
// if the unit is created later in the game.
// This only works with stock faces; when a player joins with a custom face into this unit,
// all current players need to be force-updated to the desired face as custom face overwrites current face.
// Use [[BIS_fnc_setIdentity]] for persistent identity.
</sqf>
 
|seealso= [[face]] [[setIdentity]] [[setSpeaker]] [[hasCustomFace]]
}}

Latest revision as of 14:51, 16 October 2024

Hover & click on the images for description

Description

Description:
Set person's face. For a list of available faces, check CfgIdentities Category or CfgFaces config. If the face is non-existent, the face is set to 'Default' and the error is logged in the .rpt file.
Groups:
Unit Identity

Syntax

Syntax:
person setFace face
Parameters:
person: Object
face: String
Return Value:
Nothing

Examples

Example 1:
soldier1 setFace "WhiteHead_02";
Example 2:
Set persistent face for a unit in multiplayer:
this setFace "AsianHead_A3_02"; // in the init field if the unit already exists in Eden Editor
if (isServer) then { [_unit, "AsianHead_A3_02"] remoteExec ["setFace", 0, _unit] }; // if the unit is created later in the game. // This only works with stock faces; when a player joins with a custom face into this unit, // all current players need to be force-updated to the desired face as custom face overwrites current face. // Use BIS_fnc_setIdentity for persistent identity.

Additional Information

See also:
face setIdentity setSpeaker hasCustomFace

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