• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Help with Random Hero bug

Status
Not open for further replies.
Level 2
Joined
Aug 8, 2019
Messages
8
So, I am making a custom race and I want it to work like any other. Among other things, this means having a working random hero at the begining. I am able to do this much, just a simple replacer trigger. The problem is that if I use a Random Hero, I can't buy my second one until I have Upgraded my "Town Hall" to tier 3, at the end, essentially leaving me with only 2 heroes, instead of 3. Any ideas what might be the cause of this?
Thanks in advance
 
The cause is that the removed hero does still Count for the tech 'HERO'. I would advise to remove
  • Melee Game - Create starting units (for all players)
And instead use a Playergroup loop and create the starting Units playerwise that allows you to do custom Actions for you custom race without creating a hero.
Kinda like that
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • -------- Not your Custom Race --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Default Race
        • Then - Actions
          • Melee Game - Create (Race of (Picked player)) starting units for (Picked player) at ((Picked player) start location) (Include Heroes)
        • Else - Actions
          • Melee Game - Create (Race of (Picked player)) starting units for (Picked player) at ((Picked player) start location) (Exclude Heroes)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Use random heroes is set) Equal to True
            • Then - Actions
              • -------- Create Random Hero of your Race --------
            • Else - Actions
              • Player - Set (Picked player) Available free Heroes to 1
 
Status
Not open for further replies.
Top