setObjectTexture

From BISim Wiki
Jump to: navigation, search


Introduced in  vbs2  version 1.00

Template:globalTemplate:local

Click on the images for descriptions


Introduced in

Version:1.00

Description

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

Syntax: object setObjectTexture [selection,texture]
Parameters:
Return Value: Nothing

Examples

Examples:
player setObjectTexture ["face","\MyAddon\blue.paa"]
box setObjectTexture [0,"#(argb,8,8,3)color(0,1,0,0.5)"]
SelectionBrowser.jpg
Demo mission: File:SelectionBrowser.zip

Additional Information

See also: getObjTexture, setObjectTextureGlobal
Multiplayer: 
Problems: 

Notes

Only post proven facts here. Use the talk page or the forums for discussions.



Notes

Bottom Section

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox