This site is deprecated.
The information contained on this site will not be maintained beyond VBS3 17.4.
For the latest updates and new script commands for VBS3 18.1 and later, see the new SQF Scripting Reference at the following site:
|Description:|| Set the texture of the given selection.
The selection must be registered in the "hiddenSelections" entry of the config.cpp, and in the "sections" entry of the model.cfg for the object.
'Selection' can be either a number, with the index of the selection in the "hiddenSelections" config entry; or it can be a string describing the selection name in the model.
The texture can be in PAA or JPG format (be aware though, that JPGs are displayed very bright), and must have a side length of 2^n (e.g. 64, 256, etc.). They can reside in either the mission folder, or in an addon.
If V2.0+ videos can be defined as a texture. They have to be in OGV format, and will playing continuously, as soon as they're applied. To stop the looping video, the texture has to be set to "".If the texture is set to "#reset", it will be set to its starting/default texture. If the texture is set to "" (empty string), the selection becomes invisible.
|Syntax:||object setObjectTexture [selection,texture]|
player setObjectTexture ["face","\MyAddon\blue.paa"]
box setObjectTexture [0,"#(argb,8,8,3)color(0,1,0,0.5)"]
Demo mission: File:SelectionBrowser.zip
|See also:||getObjTexture, setObjectTextureGlobal|