Axolotl 31 Share Posted September 8, 2021 Hey everyone, I am wanting to ensure that the players CombatStyle when performing Ranged is set to rapid. Unfortunately both Accurate and Rapid are the same when it comes to: Combat.getCombatStyle(); resulting in a return of "RANGED". I have tried to do this with PlayerSettings and Widgets and can't seem to get it. I noticed PlayerSetting (43) changes: 0 = accurate, 1 = rapid, 3 = longrange; however, I am not able to get the change in this value with: log("Ranged combat style value: " + PlayerSettings.getBitValue(43)); as it always returns 0. The varbit value (8354) after a delay of 10 seconds or so seems to change with the ranged CombatStyle change, but is inconsistent (1397-1410 and increasing with testing). I also attempted with widgets, but after testing, I can't seem to find anything that shows an update when it is toggled, I tried with: log("rapid text: " + rapid.getText()); log("rapid actions: " + Arrays.toString(rapid.getActions())); log("rapid text color: " + rapid.getTextColor()); log("rapid shadow color: " + rapid.getShadowColor()); log("rapid type: " + rapid.getType()); log("rapid texture id: " + rapid.getTextureId()); If anyone knows of a way to do this, that would be amazing, Thank you Link to comment Share on other sites More sharing options...
Pandemic 2675 Share Posted September 9, 2021 Hey there, so to get the value of a PlayerSetting you'd use PlayerSettings.getConfig(43), getBitValue is what you use for the "Varbit" tab Also, you don't need to worry about any of that for this particular issue, as we have a helper method to set the combat style for you: Combat.setCombatStyle(CombatStyle.RANGED) You can find all available combat style's on our Javadocs here. Link to comment Share on other sites More sharing options...
Axolotl 31 Author Share Posted September 9, 2021 1 hour ago, Pandemic said: Hey there, so to get the value of a PlayerSetting you'd use PlayerSettings.getConfig(43), getBitValue is what you use for the "Varbit" tab Also, you don't need to worry about any of that for this particular issue, as we have a helper method to set the combat style for you: Combat.setCombatStyle(CombatStyle.RANGED) You can find all available combat style's on our Javadocs here. Thank you @Pandemic for the config idea, that did the trick However, I did try the: Combat.setCombatStyle(CombatStyle.RANGED) It didn't work while the Inventory tab / combat tab was open to set it to rapid as it just keeps returning true even while on accurate and doesn't do anything, i have a feeling it is cause the CombatStyle is RANGED while both Accurate and Rapid, there likely needs to be unique combatStyles for each Link to comment Share on other sites More sharing options...
Pandemic 2675 Share Posted September 9, 2021 20 hours ago, Axolotl said: Thank you @Pandemic for the config idea, that did the trick However, I did try the: Combat.setCombatStyle(CombatStyle.RANGED) It didn't work while the Inventory tab / combat tab was open to set it to rapid as it just keeps returning true even while on accurate and doesn't do anything, i have a feeling it is cause the CombatStyle is RANGED while both Accurate and Rapid, there likely needs to be unique combatStyles for each I'll add RANGED_RAPID to today's update Edit: Should be live in v3.9.1, run the launcher to grab the latest version! Link to comment Share on other sites More sharing options...
Axolotl 31 Author Share Posted September 11, 2021 On 9/9/2021 at 4:43 PM, Pandemic said: I'll add RANGED_RAPID to today's update Edit: Should be live in v3.9.1, run the launcher to grab the latest version! You're the best! Thanks @Pandemic Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.