Moving Armys

hasslarn

New Member
Reaction score
20
Hello , how can i make so that i can move a full army , lets say with 50 units by only controlling one unit?

i have seen this in another game where they use tomes to recruite the units into a unit group then the leader uses a abillity to make all move to the same point.

I tryed alot with trigger anyone that can help?
 

_whelp

New Member
Reaction score
54
Maybe have a unit group and select everyone in range of the first unit, then order them to move.
 

hasslarn

New Member
Reaction score
20
but how would this be possible

the unit group thing is easy its just picking everyone in range like you said


but for moving them , thats another thing what action and event shall i use?
 

CuteCumber

Member
Reaction score
4
Make a periodic event? Checking every how many seconds, and if the selected unit is moving, set variable for the point it move and order the picked units to move to the point also.
 

hasslarn

New Member
Reaction score
20
Ok im gonna test some things ill put the trigger here when its done.

I will edit this post.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Here is a more complete type of idea
Trigger:
  • THELPER
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Set Point = (Target point of issued order)
      • Set UnitGroup = (Units within 512.00 of (Position of (Triggering unit)))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To Point
 

hasslarn

New Member
Reaction score
20
Wc3 Crashes when i try to move the units

Here is the triggers
Trigger:
  • Commander
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Commander
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is A Hero) Equal to False
        • Then - Actions
          • Unit - Add Recruite to (Target unit of ability being cast)
          • Set Followcommander[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
        • Else - Actions



Trigger:
  • Recruite
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Recruite
    • Actions
      • Set Commander[(Player number of (Owner of (Casting unit)))] = (Casting unit)
      • Unit Group - Pick every unit in (Units within 500.00 of (Position of Commander[(Player number of (Owner of (Casting unit)))])) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to (Owner of Commander[(Player number of (Owner of (Casting unit)))])
            • Then - Actions
              • Unit Group - Add (Picked unit) to CommanderGroup[(Player number of (Owner of (Picked unit)))]
            • Else - Actions



Trigger:
  • Move
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Ordered unit) Equal to Followcommander[(Player number of (Owner of (Triggering unit)))]
    • Actions
      • Set CommPoint[(Player number of (Owner of (Triggering unit)))] = (Target point of issued order)
      • Unit Group - Pick every unit in CommanderGroup[(Player number of (Owner of (Triggering unit)))] and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To CommPoint[(Player number of (Owner of (Triggering unit)))]



Recruite is based off roar
and The commander spell is based off inner fire


whats the problem wc3 crashes after using the Recruite then moving the commander.
 

DonRoman

New Member
Reaction score
5
I guess the commander unit is part of the group and will therefore create an infinite loop, try out this:

Trigger:
  • Move
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Ordered unit) Equal to Followcommander[(Player number of (Owner of (Triggering unit)))]
    • Actions
      • Set CommPoint[(Player number of (Owner of (Triggering unit)))] = (Target point of issued order)
      • Trigger - Turn off (this Trigger)
      • Unit Group - Pick every unit in CommanderGroup[(Player number of (Owner of (Triggering unit)))] and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To CommPoint[(Player number of (Owner of (Triggering unit)))]
      • Trigger - Turn on (this Trigger)
 

hasslarn

New Member
Reaction score
20
I guess the commander unit is part of the group and will therefore create an infinite loop, try out this:

Trigger:
  • Move
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Ordered unit) Equal to Followcommander[(Player number of (Owner of (Triggering unit)))]
    • Actions
      • Set CommPoint[(Player number of (Owner of (Triggering unit)))] = (Target point of issued order)
      • Trigger - Turn off (this Trigger)
      • Unit Group - Pick every unit in CommanderGroup[(Player number of (Owner of (Triggering unit)))] and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To CommPoint[(Player number of (Owner of (Triggering unit)))]
      • Trigger - Turn on (this Trigger)

Now it worked

+rep
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top