juleshuxley 8 Posted October 31, 2020 I'm trying to make a minimalist UI. I've had some success but one thing I'm struggling with is recreating the "waiting for the next round" bar. You know, this thing: My UI is constantly getting refreshed in a while loop, so I was hoping I could query if a certain weapon was ready to fire. Functions such as CanFire and WeaponState unfortunately didn't give me what I wanted and are misleadingly named. So is there a function I've missed that can query the weapon state i.e ready to fire, not ready to fire? Failing that, where is the m256's "time taken for next round to be loaded" set? In a config? What attribute am I looking for? Can I use getText to extract it to a variable in my script? If it's listed in seconds somewhere in the config I could use an event handler and BIS_fnc_deltaTime to work out if a weapon is ready to fire or not. Share this post Link to post Share on other sites
juleshuxley 8 Posted October 31, 2020 please can someone answer this question 🙏🙏🙏🙏🙏 Share this post Link to post Share on other sites
Larrow 2403 Posted October 31, 2020 7 hours ago, juleshuxley said: Failing that, where is the m256's "time taken for next round to be loaded" set? In a config? Yes in config of weapon reloadTime. 1 Share this post Link to post Share on other sites
juleshuxley 8 Posted October 31, 2020 _name = getText(configfile >> "CfgWeapons" >> "CUP_optic_LeupoldMk4_20x40_LRT" >> "displayName"); _reloadTime = getText(configfile >> "CfgWeapons" >> "CUP_optic_LeupoldMk4_20x40_LRT" >> "reloadTime"); _name; // "Leupold Mark 4 6.5-20x50mm LR/T" _reloadTime; // "" Attempting to retrieve reloadTime results in an empty string? reloadTime is most definitely in the config, unless the indentation or colors mean something? Update, just realised displayName is red and unindented I'm guessing that's something to do with it... Share this post Link to post Share on other sites
pierremgi 3282 Posted October 31, 2020 already answered in another post. Don't duplicate please. Share this post Link to post Share on other sites
juleshuxley 8 Posted November 1, 2020 ok, thanks for answering Share this post Link to post Share on other sites
Larrow 2403 Posted November 1, 2020 23 hours ago, juleshuxley said: Attempting to retrieve reloadTime results in an empty string? As it is not a string, its a number, so use getNumber instead. 23 hours ago, juleshuxley said: unless the indentation or colors mean something? Indentation means the member is inherited from its parent, not indented means set in this class. Colors are member type, text, number or array. 1 Share this post Link to post Share on other sites