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

Training waves

Status
Not open for further replies.
Level 12
Joined
Oct 28, 2019
Messages
474
Need help doin a wave trigger. A barracks trains a unit every 20 seconds. The units goes to a area. Then when the wave has X units they attack.

How do on each wave have diferents number of units? The first 10 the second 12 the third 12 or 15 etc....
 
Level 12
Joined
Jun 15, 2016
Messages
472
It sounds like a basic attack wave pattern. You can look at moyackx's AI tutorial or mine (in the signature) to see how it's done. Also, to set the area the units will get to you can call SetCaptainHome at the start of the script.
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
Here is a simple (not leak free) system i'm using, if you don't want to go into configuring AI

attackernumber is an integer that increases over time in a separate trigger

  • Events
    • Unit - A unit Finishes training a unit
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Ice Troll Hut (Chief)
    • (Troll main <gen> contains (Triggering unit)) Equal to True
  • Actions
    • Unit - Order (Triggering unit) to train/upgrade to a Ice Troll Warlord
    • Unit Group - Add (Trained unit) to trollattackers[1]
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Number of units in trollattackers[1]) Greater than or equal to attackernumber
      • Then - Actions
        • Unit Group - Pick every unit in trollattackers[1] and do (Actions)
          • Loop - Actions
            • Unit - Order (Picked unit) to Attack-Move To (Position of xxxxx)
        • Unit Group - Remove all units from trollattackers[1].
      • Else - Actions
 
Status
Not open for further replies.
Top