Hero Select Anywhere (now with role customization)
This code is over 6 months old. The code may have expired and might no longer function.
View original size
A fully featured if somewhat elaborate hero select screen that can be used in any mode. Simply hold Reload to change heroes.
I tried to retain as much functionality from default hero select as possible:
- The list of all heroes is automatically sorted alphabetically within their role on game start
- I did my best to make it capable of accomodating new heroes in the future
- Double clicking to quick select a hero is supported
- The select screen properly shows each player's allowed heroes
You can freely use this in your own mode (in fact, I created it primarily for others to use it). Here are some compatibility notes to keep in mind:
- Currently, the script uses 2 effects and 30 texts to render the hero select screen. These are created on game start and never destroyed, so keep in mind you will have reduced entity/text budgets.
- There are Workshop Settings to turn off pieces of the hero select screen if you are running into text budget issues.
- The Lightweight Mode setting overrides the rest of the text settings and reduces total text usage to 2 + 1 per 4 heroes in the game (so currently, 10). It also changes hero confirmation from double clicking or clicking "Continue" to simply clicking once on the hero.
- You can use this module to enable hero selection when Respawn As Random Hero is on. Make sure to enable the "Respawn As Random Hero" Compatibility Workshop Setting, otherwise the game will override hero selection.
- Module script stats:
- Element count: 7170*
- Global variable slots: 107-127
- Player variable slots: 124-127
- Subroutine slots: 125-127
- As of 3/28/2021, you can now edit hero roles.
- Look for the rule named
[HeroSelectAnywhere.del] (Subroutine) Define hero arrays - Simply edit the global arrays TankHeroes/DamageHeroes/SupportHeroes and the hero select screen will automatically group and sort them in the appropriate role.
- A non-executing example is included in the subroutine.
- Look for the rule named
* I recognize that this is a pretty substantial number. If there is enough interest I can make a version similar to Lightweight Mode with no settings but a smaller overall script size.
Questions or concerns? Contact me on Discord via Josbird#1908 or on Twitter via @Josbird_
Source code
Loading...
5 Comments
imagine this in compet
could you LOWER THE SENSITIVITY a bit? i literally cant pick any heroes
I still don't have a good solution for this unfortunately. It uses aim direction for input so if you have a high sensitivity ingame it will affect the cursor's sensitivity. You can try lowering the set aim speed from 15 to 10 in the open hero select rule but again that will affect every player, including ones with very low sensitivity.
I know I'm late and this may be outdated, but you could use throttle for selecting heroes
you're a legend