setFace: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 50: Line 50:
|x2= Set persistent face for a unit in multiplayer:
|x2= Set persistent face for a unit in multiplayer:
<sqf>this setFace "AsianHead_A3_02"; // in the init field if the unit already exists in Eden Editor</sqf>
<sqf>this setFace "AsianHead_A3_02"; // in the init field if the unit already exists in Eden Editor</sqf>
<sqf>if (isServer) then { [_unit, "AsianHead_A3_02"] remoteExec ["setFace", 0, _unit] }; // if the unit is created later in the game. However this will work only with stock faces, when player joins with a custom face, all current players need to be force updated to the desired face as custom face overwrites current face. Use BIS_fnc_setIdenity for persistent identity.</sqf>
<sqf>if (isServer) then { [_unit, "AsianHead_A3_02"] remoteExec ["setFace", 0, _unit] };  
/* if the unit is created later in the game. However this will work only with stock faces, when player joins with a custom face,  
all current players need to be force updated to the desired face as custom face overwrites current face. Use BIS_fnc_setIdenity for persistent identity.*/</sqf>


|seealso= [[face]] [[setIdentity]] [[setSpeaker]] [[hasCustomFace]]
|seealso= [[face]] [[setIdentity]] [[setSpeaker]] [[hasCustomFace]]
}}
}}

Revision as of 10:17, 30 June 2024

Hover & click on the images for description

Description

Description:
Set person's face. For a list of available faces, check Category:CfgIdentities or 'CfgFaces' config. If the face is non-existent, the face is set to 'Default' and the error is logged in .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. However this will work only with stock faces, when player joins with a custom face, all current players need to be force updated to the desired face as custom face overwrites current face. Use BIS_fnc_setIdenity 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