setObjectTextureGlobal: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Killzone Kid (talk | contribs) (example) |
||
Line 28: | Line 28: | ||
|x1= <code>[[player]] [[setObjectTextureGlobal]] [0, "\MyAddon\blue.paa"];</code>|= EXAMPLE1 | |x1= <code>[[player]] [[setObjectTextureGlobal]] [0, "\MyAddon\blue.paa"];</code>|= EXAMPLE1 | ||
|x2= <code>//set up persistent texture keeper | |||
[[player]] [[addEventHandler]] ["Take", { | |||
([[getObjectTextures]] [[player]] + <nowiki>[</nowiki>[[uniformContainer]] [[player]] [[getVariable]] "texture"]) | |||
[[params]] ["_texUniform", "_texInsignia", "_texCustom"]; | |||
[[if]] ([[isNil]] "_texCustom") [[exitWith]] {}; | |||
[[if]] (_texUniform == _texCustom) [[exitWith]] {}; | |||
[[player]] [[setObjectTextureGlobal]] [0, _texCustom]; | |||
[[false]] | |||
}]; | |||
//Example: make current uniform persistently blue | |||
_texture = "#(rgb,8,8,3)color(0,0,1,1)"; //blue texture | |||
[[player]] [[setObjectTextureGlobal]] [0, _texture]; //set it on player | |||
[[uniformContainer]] [[player]] [[setVariable]] ["texture", _texture, [[true]]]; //store it on uniform</code>|= EXAMPLE2 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 22:54, 13 July 2015
Description
- Description:
- Set the texture of the given selection on all computers in a network session.
- Groups:
- Uncategorised
Syntax
- Syntax:
- obj setObjectTextureGlobal [selection, texture]
- Parameters:
- obj: Object
- [selection,texture]: Array
- selection: Number
- texture: String
- Return Value:
- Nothing
Examples
- Example 1:
player setObjectTextureGlobal [0, "\MyAddon\blue.paa"];
- Example 2:
//set up persistent texture keeper player addEventHandler ["Take", { (getObjectTextures player + [uniformContainer player getVariable "texture"]) params ["_texUniform", "_texInsignia", "_texCustom"]; if (isNil "_texCustom") exitWith {}; if (_texUniform == _texCustom) exitWith {}; player setObjectTextureGlobal [0, _texCustom]; false }]; //Example: make current uniform persistently blue _texture = "#(rgb,8,8,3)color(0,0,1,1)"; //blue texture player setObjectTextureGlobal [0, _texture]; //set it on player uniformContainer player setVariable ["texture", _texture, true]; //store it on uniform
Additional Information
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
Notes
Bottom Section
- Posted on March 8, 2015 - 21:15 (UTC)
- Sxp2hiiigh
- The effect is persistent and will be synchronized for players who join in progress. (Tested with Arma 3 v1.40)