Duo Heroes
View original size
How It Works
After you select a hero, the hero selection screen will come up again and allow you to pick a second hero.
During the game, press INTERACT to swap heroes if your swap charge is at 100%.
Swap charge increases passively and by doing damage - rates can be changed in workshop settings.
Cooldowns, health, ammo, ult charge are separate for both heroes.
Reserve Hero HUD

Top to bottom, shows: Which hero is in reserve, what your swap charge is, what button to press to swap, reserve hero ult charge and health, and reserve hero cooldowns.
Workshop Settings
Swap Charge
- Passive Swap Charge Rate: Control how fast the swap charge passively builds up. Set to 0 to disable passive swap charge gain. Default: 0.5
- Active Swap Charge Rate: Control how fast swap charge is gained by doing damage or healing. Set to 0 to disable active swap charge gain. Default: 0.5
- Healing Charge Multiplier: Control how effective healing is at giving swap charge compared to damage. Set to 0 to disable healing contributing to swap charge. Default: 0.5
Reserve Hero
- Reserve Hero Ability Cooldown Speed Scalar: Control how fast the ability cooldowns of your reserve hero count down. Set to 0 to disable cooldowns from ticking down for your reserve hero. Default: 1.0
- Reload In Background: Toggle whether or not your ammo count will be replenished when you switch heroes. Default: OFF
- Healing In Background Rate: Control how fast your reserve hero will be healed while you are playing your other hero. Set to 0 to disable healing in background. Default: 0.0
- Healing In Background Delay: Control how long it takes for your reserve hero to start being healed while you are playing your other hero. Default: 0.5
Game Settings
- Allow Changing Heroes In Spawn: Toggle whether or not you are allowed to change heroes. Doing so replaces your current hero with the new one. Default: ON
- Charge Hero Swap In Spawn: Toggle whether or not your swap charge is always filled while in your spawn room. Default: ON
- Cancel Hero Swap With Crouch: Toggle whether or not pressing CROUCH while pressing INTERACT cancels hero swap. Useful mostly for allowing teleporter use without accidentally swapping heroes. Default: ON
Players |
1 - 12
Categories:
Minigames,
Miscellaneous
Created at:
Last updated:
Current version:
1.2.2
Share URL:
https://workshop.codes/duoheroes
Source code
Loading...
12 Comments
Wow, that's something I've tried to do some time ago and failed, but you made it working and better overall. Great job
Thanks!
Hi there, the code is working great so far, however I found a possible bug while combining my other settings. I dunno if this is an issue inside this code or not. Mercy's resurrect ability always resets to 0 seconds of cooldown when switching off her.
I haven't been able to replicate this issue. What settings had you changed when you noticed this happen?
Tried it with the default code and it still bugs.
I think I figured out the issue! The resurrect is actually secondary fire and not ability 2 like the code thinks.
Ok, I looked into it more and it appears this is a console issue.
Between PC and PS4/Xbox/Switch, ability 2 and secondary fire are switched for Mercy.
When I enterted the rez cooldown to secondary fire, it just transferred to abiltiy 2 on console.
That's weird. I'll look in to this. I've been working on ways to determine if a player is using keyboard/mouse or controller within a workshop mode for another project - I might bring that over to this mode.
Nice. I'm not sure if there is a way to detect console and pc players. Maybe if you create a workshop setting that can switch inputs for Mercy when it's needed.
The two inputs were switched presumably so it would be easier to press L2 then to press R1 which is the usual abiltiy 2.
Pushed a potential fix for that bug (same share code). I can't test it myself since I don't have a console, so let me know if it works.
Yes! It works fine now! Thank you for fixing it! :)
I can't remember quite exactly but my copy is here: 8927Z
Your settings should be at the bottom. I think removed the freeze setting and auto change at the beginning.