Stirls 11 Posted December 25, 2014 As part of a HALO mod, we need to create the ammo counters seen on many of the weapons. To do this, we need a way of creating this without taking up too much space or too much time. Using a series of individual planes to cycle through will really just eat up unnecessary space. Is there a way of changing a texture dynamically? Share this post Link to post Share on other sites
jshock 513 Posted December 26, 2014 I think your best bet would be to write a function with one of the two following commands: https://community.bistudio.com/wiki/setObjectTextureGlobal https://community.bistudio.com/wiki/setObjectMaterial Share this post Link to post Share on other sites
Stirls 11 Posted December 27, 2014 Noted. We'll give it a shot. Thanks. Share this post Link to post Share on other sites
654wak654 25 Posted December 27, 2014 I don't think you should use the global ones, as your ammo status and everything on the weapon only needs to be seen by you. Just put the selections and change the texture for the player only with code running on his machine. Just an idea for higher server performance. Share this post Link to post Share on other sites
Stirls 11 Posted December 29, 2014 Apparently hidden selections don't work on weaponry. So that's a problem. Share this post Link to post Share on other sites
da12thMonkey 1943 Posted December 29, 2014 hiddenSelections do work on weaponry, it's only that the setobjecttexture and setobjectmaterial commands do not work, because weapons are not a class cfgVehicles Object. hiddenSelections on class cfgweapons items is limited to using the hiddenSelectionsTextures[] and hiddenSelectionsMaterials[] arrays in the config. To do an ammo counter on weapons your best bet would probably be to do some voodoo with the revolving animation source; hiding and unhiding and the numbers on the counter in loops of sorts. It's the same source used to hide rounds in MG belts, but obviously the anim written to get digits to hide and unhide in order would be quite fiddly. Share this post Link to post Share on other sites
654wak654 25 Posted December 29, 2014 Maybe use attachTo to attach a small object (some simple transparent square) on to the weapon and do the texturing on that? Share this post Link to post Share on other sites