setObjectMaterial: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style='display:none'>Notes</h3> <dl class='command_description'> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> <h3 style='display:none'>Bottom Section</h3>" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma3 |Game name=
| arma3


|0.50|Game version=
|0.50


|arg= global |Multiplayer Arguments=
|arg= global


|eff= local |Multiplayer Effects=
|eff= local


|gr1= Object Manipulation |GROUP1=
|gr1= Object Manipulation


| Sets material of object selection. The selection number is defined through the [[CfgVehicles_Config_Reference#hiddenSelections | hiddenselection]][]<nowiki>=</nowiki>{} array in the vehicle's config (starting with 0).   |DESCRIPTION=
| Sets material of object selection. The selection number is defined through the [[CfgVehicles_Config_Reference#hiddenSelections | hiddenselection]][]<nowiki>=</nowiki>{} array in the vehicle's config (starting with 0).


| obj '''setObjectMaterial''' [selectionNumber, material] |SYNTAX=
| obj '''setObjectMaterial''' [selectionNumber, material]


|p1= obj: [[Object]] |PARAMETER1=
|p1= obj: [[Object]]


|p2= [selectionNumber, material]: [[Array]] |PARAMETER2=
|p2= [selectionNumber, material]: [[Array]]


|p3= selectionNumber: [[Number]] |PARAMETER3=
|p3= selectionNumber: [[Number]]


|p4= material: [[String]] |PARAMETER4=
|p4= material: [[String]]


| [[Nothing]] |RETURNVALUE=
| [[Nothing]]




|x1= <code>car [[setObjectMaterial]] [0,"A3\Structures_F\Data\Windows\window_set.rvmat"];
|x1= <code>car [[setObjectMaterial]] [0,"A3\Structures_F\Data\Windows\window_set.rvmat"];
car [[setObjectMaterial]] [1,"A3\Structures_F\Data\Windows\window_set.rvmat"];</code>|EXAMPLE1=
car [[setObjectMaterial]] [1,"A3\Structures_F\Data\Windows\window_set.rvmat"];</code>




| [[getObjectMaterials]], [[setObjectTextureGlobal]], [[getObjectTextures]], [[setObjectTexture]], [[setObjectMaterialGlobal]] |SEEALSO=
| [[getObjectMaterials]], [[setObjectTextureGlobal]], [[getObjectTextures]], [[setObjectTexture]], [[setObjectMaterialGlobal]]


| |MPBEHAVIOUR=
|
}}
}}



Revision as of 11:12, 18 January 2021

Hover & click on the images for description

Description

Description:
Sets material of object selection. The selection number is defined through the hiddenselection[]={} array in the vehicle's config (starting with 0).
Groups:
Object Manipulation

Syntax

Syntax:
obj setObjectMaterial [selectionNumber, material]
Parameters:
obj: Object
[selectionNumber, material]: Array
selectionNumber: Number
material: String
Return Value:
Nothing

Examples

Example 1:
car setObjectMaterial [0,"A3\Structures_F\Data\Windows\window_set.rvmat"]; car setObjectMaterial [1,"A3\Structures_F\Data\Windows\window_set.rvmat"];

Additional Information

See also:
getObjectMaterialssetObjectTextureGlobalgetObjectTexturessetObjectTexturesetObjectMaterialGlobal

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