• 🏆 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!

[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