• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

train multiple units at the same time?

Status
Not open for further replies.
Level 3
Joined
May 10, 2007
Messages
39
hey.
i'm not sure if this should be posted in this section but anyway
i wanna make multiple units train at the same..... how i do that?
 
Level 15
Joined
Feb 9, 2006
Messages
1,598
One way to do it :

  • Trigger
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
    • Actions
      • Set Temp_Point = ((Position of (Trained unit)) offset by 25.00 towards 0.00 degrees)
      • Unit - Create 1 (Unit-type of (Trained unit)) for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Temp_Point)
 
Level 7
Joined
Mar 12, 2006
Messages
407
  • Trigger
  • Events
  • Unit - A unit Finishes training a unit
  • Conditions
  • Actions
  • Set Temp_Point = ((Position of (Trained unit))
  • Unit - Create 1 (Unit-type of (Trained unit)) for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
  • Custom script: call RemoveLocation(udg_Temp_Point)
  • Unit - Issue Order (last created unit) to follow (trained unit)
That follow command only works if you create one additional unit

  • Trigger
  • Events
  • Unit - A unit Finishes training a unit
  • Conditions
  • Actions
  • Set Temp_Point = ((Position of (Trained unit))
  • Loop - For each Integer A from 1 to x do (multiple actions)
  • Unit - Create 1 (Unit-type of (Trained unit)) for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
  • Unit - Issue Order (last created unit) to follow (trained unit)
  • loop end
  • Custom script: call RemoveLocation(udg_Temp_Point)
where x is the number of additional units
this will order all created units to follow the trained unit
 
Status
Not open for further replies.
Top