Dusty1Actual 2 Posted April 5, 2018 Hi there, Im in the middle of making a custom shooting range. Im using this in the init of the "One meter User Texture" and im putting that over the "Target" objects : this setObjectTexture [0, "target.jpg"] Would there possibly be a way to randomize that texture to be one of say 6 jpeg files in the mission folder? My idea is to have a trigger set so that whenever it is activated, the textures on the targets change randomly. For example, the mission file would have multiple jpegs marked out as "target1.jpeg" "target2.jpeg" "hostage.jpeg" "target3.jpeg" and when the mission starts, each target randomly selects a jpeg to show. Help would be greatly appreciated. 1 Share this post Link to post Share on other sites
stanhope 412 Posted April 5, 2018 _textureArray = ["target1.jpeg","target2.jpeg","target3.jpeg"]; this setObjectTexture [0, selectRandom _textureArray ]; ^that in the init-field of your targets and a slightly modified form of that (replace 'this' with the objects varname) in your trigger. Share this post Link to post Share on other sites
Dusty1Actual 2 Posted April 5, 2018 On 4/5/2018 at 8:01 AM, stanhope said: _textureArray = ["target1.jpeg","target2.jpeg","target3.jpeg"]; this setObjectTexture [0, selectRandom _textureArray ]; ^that in the init-field of your targets and a slightly modified form of that (replace 'this' with the objects varname) in your trigger. Thanks a whole bunch, will be trying this as soon as i gt back on! Share this post Link to post Share on other sites
Dusty1Actual 2 Posted April 5, 2018 On 4/5/2018 at 8:01 AM, stanhope said: _textureArray = ["target1.jpeg","target2.jpeg","target3.jpeg"]; this setObjectTexture [0, selectRandom _textureArray ]; ^that in the init-field of your targets and a slightly modified form of that (replace 'this' with the objects varname) in your trigger. I've come up with an issue where on mission start a pop up states that "target2.jpeg" was not found, Though I am sure it is in the mission folder where all the others are, none of them seem to work with the random script. Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted April 5, 2018 On 4/5/2018 at 7:50 AM, Dusty1Actual said: "target1.jpeg" JPEG image (.jpg) Hello there guys ! sorry but check above the extension of the file. It' s always better to use (in game) the .paa format images textview2 https://community.bistudio.com/wiki/Arma_3_Tools_Installation Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted April 5, 2018 On 4/5/2018 at 8:51 AM, Dusty1Actual said: "target2.jpeg" was not found, check above Share this post Link to post Share on other sites
Dusty1Actual 2 Posted April 5, 2018 On 4/5/2018 at 8:53 AM, GEORGE FLOROS GR said: JPEG image (.jpg) Hello there guys ! sorry but check above the extension of the file. It' s always better to use (in game) the .paa format images textview2 https://community.bistudio.com/wiki/Arma_3_Tools_Installation Ahh! Brilliant, haha thank you! it works now, Will be crediting You both if i ever release this! Cheers! 1 Share this post Link to post Share on other sites