• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Detect hero choices for future units.

Status
Not open for further replies.
Level 2
Joined
Nov 8, 2015
Messages
8
I tried, but failed to make a unitreplacer based on what heroes have been taken. So I want to detect players that taken their hero before a minute. For each hero it will change possible outcomes of replacing some base units and the split among will be randomized abit. It needs to work for 1 to 4 players and the way you pick your hero is basicly moving a shade into a hero specific region.




If needed the map is with it and I want to change the revenants with this.
 

Attachments

  • Trollbolt's Challenge - Team.w3x
    164.5 KB · Views: 17
It might be easier to make an Boolean Array and give each Hero-Type a specific Index instead of saving the picked Unit-Type for each Player. After all this Map looks like it has unique heroes.
On pick set the Boolean at Hero's Index to true.
At the Replacing check if a Hero was picked and morph dat Revenant if picked.

That is what was modyfied.

Edit: I made a simple Mistake:
This:
  • Change Revenant Type
    • Events
      • Time - Elapsed game time is 15.10 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Hero_Picked[Hero_Picked_Dreadforged] Equal True
        • Then - Actions
          • Unit - Replace Revenant (Base) 0034 <gen> with a Revenant (Dreadforged) using New Unit: Max. life and mana
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Hero_Picked[Hero_Picked_Stormblade] Equal True
            • Then - Actions
              • Unit - Replace Revenant (Base) 0035 <gen> with a Revenant (Stormblade) using New Unit: Max. life and mana
            • Else - Actions
              • Do nothing
has to be transformed to this:
  • Change Revenant Type
    • Events
      • Time - Elapsed game time is 15.10 seconds
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Hero_Picked[Hero_Picked_Dreadforged] Equal True
        • Then - Actions
          • Unit - Replace Revenant (Base) 0034 <gen> with a Revenant (Dreadforged) using New Unit: Max. life and mana
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Hero_Picked[Hero_Picked_Stormblade] Equal True
        • Then - Actions
          • Unit - Replace Revenant (Base) 0035 <gen> with a Revenant (Stormblade) using New Unit: Max. life and mana
        • Else - Actions
 

Attachments

  • Trollbolt's Challenge - Team.w3x
    165.6 KB · Views: 33
Last edited:
Status
Not open for further replies.
Top