• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Random Building

Status
Not open for further replies.
Level 6
Joined
Nov 28, 2007
Messages
203
  • wtf
    • Events
      • Unit - A unit Finishes construction
    • Conditions
    • Actions
      • Unit - Remove (Constructed structure) from the game
      • Set Point_Var = (Position of (Constructed structure))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current research level of (Your Luck Ability) for (Owner of (Triggering unit))) Equal to 1
        • Then - Actions
          • Unit - Create 1 (Unit-type of (Random unit from RunesOfLevel[1])) for (Owner of (Triggering unit)) at Point_Var facing Default building facing degrees
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current research level of (Your Luck Ability) for (Owner of (Triggering unit))) Equal to 2
        • Then - Actions
          • Unit - Create 1 (Unit-type of (Random unit from RunesOfLevel[2])) for (Owner of (Triggering unit)) at Point_Var facing Default building facing degrees
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current research level of (Your Luck Ability) for (Owner of (Triggering unit))) Equal to 3
        • Then - Actions
          • Unit - Create 1 (Unit-type of (Random unit from RunesOfLevel[3])) for (Owner of (Triggering unit)) at Point_Var facing Default building facing degrees
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Point_Var)
RunesOfLevel[X] is a unit group array variable. Add the group of runes that you want for each level of the ability into it by using
  • Unit Group - Add (Unit) to RunesOfLevel[X]
at initialization (or whenever you want)
 
Status
Not open for further replies.
Top