• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[Trigger] makeing a random hero

Status
Not open for further replies.
Level 11
Joined
Nov 12, 2006
Messages
765
On my map (star wars), i have this situation. a Jedi padawan gets to level 10, and then i want it to change into a Jedi Knight useing 1 of the 3 Jedi knight units i made.

im sure i got the conditions right, but how can i make it so that once a padwan turns to level 10, it will randomly become either Jedi Knight A, Jedi Knight B, or Jedi Knight C. i think i have to do somthing with integers here, and probaly somthing with a variable for each jedi knight, so can someone help or show me how i can do this? thanks.
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
Will this help?
  • Jedi Padawan gets to level 10
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Hero level of (Triggering unit)) Equal to 10
          • (Unit-type of (Triggering unit)) Equal to Jedi Padawan
    • Actions
      • Set Random = (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Random Equal to 1
        • Then - Actions
          • Unit - Replace (Triggering unit) with a Jedi Knight A using The old unit's relative life and mana
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random Equal to 2
            • Then - Actions
              • Unit - Replace (Triggering unit) with a Jedi Knight B using The old unit's relative life and mana
            • Else - Actions
              • Unit - Replace (Triggering unit) with a Jedi Knight C using The old unit's relative life and mana
 
Level 6
Joined
Nov 28, 2007
Messages
203
hey.. if the Unit can (in some way xD) lvl from lvl9 to lvl11, then you should make the condition
  • (Hero level of (Triggering unit)) Greater than or equal to 10
instead of the other one
 
Status
Not open for further replies.
Top