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

[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