juleshuxley 9 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 9 Posted October 31, 2020 please can someone answer this question 🙏🙏🙏🙏🙏 Share this post Link to post Share on other sites
Larrow 2822 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 9 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 4904 Posted October 31, 2020 already answered in another post. Don't duplicate please. Share this post Link to post Share on other sites
juleshuxley 9 Posted November 1, 2020 ok, thanks for answering Share this post Link to post Share on other sites
Larrow 2822 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 1 Share this post Link to post Share on other sites
flyingsaucerinvasion 3 Posted May 28, 2022 On 10/31/2020 at 4:46 PM, pierremgi said: already answered in another post. Don't duplicate please. Which other thread? Please show me the way. I'm looking for an answer to this question myself, and so far google has only led to this thread where you're telling them to stop talking about the issue. So unhelpful. 1 Share this post Link to post Share on other sites
Harzach 2517 Posted May 28, 2022 1 hour ago, flyingsaucerinvasion said: Which other thread? They're talking about the meaning of text color in the config viewer, and referencing a topic about that subject from the same date. He's not telling anyone to "stop talking about the issue." Quote Please show me the way. The answer to the original question appears to be available above. 2 Share this post Link to post Share on other sites
Rydygier 1317 Posted May 28, 2022 BTWhttps://community.bistudio.com/wiki/weaponState was enhanced in this regard: Quote 2.06 roundReloadPhase: Number - current ammo round reload phase (see weaponReloadingTime) 2.06 magazineReloadPhase: Number - current magazine reload phase from 1 to 0, 0 - reload complete. > 0 - reload in progress 3 1 Share this post Link to post Share on other sites