Auto-Follow

ArmyOfFrogs

New Member
Reaction score
20
Trying to get a unit to automatically follow me. One is made for each player that is playing at 15 seconds game time then..

Trigger:
  • events
    • time - elapsed game time is 16.00 seconds
    • Conditions
    • actions
      • unit group - pick every unit in (units in (playable map area)) and do (actions)
        • loop - actions
          • Set Wisp[1] = (Units owned by Player 1 (Red) matching ((Unit-type of (picked unit)) equal to archer))
          • Set Wisp[2] = (Units owned by Player 2 (Blue) matching ((Unit-type of (picked unit)) equal to archer))
          • //repeats for all players
    • Trigger - Turn on Move <gen>


Trigger:
  • Move
    • Events
      • Every .5 seconds of game time
    • conditions
    • actions
      • Unit Group - Order Wisp[1] to Right-click RedHero ((this is a unit variable i have set to the heroes))
      • //repeats for all the array on the seperate heroes


Thanks if you can spot the error
 

UndeadDragon

Super Moderator
Reaction score
447
What is the problem? (What bit isn't working?)
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Shouldnt it be order wisp[1] to folow hero
 

ArmyOfFrogs

New Member
Reaction score
20
oh sorry i renamed the variable, those are the same.

And they aren't following me or even moving at all. Not sure why o_O
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Do pick every unit in wisp[1] and do action. Order picked unit to right click hero
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Do what i said but order picked unit to patrol hero
 

ArmyOfFrogs

New Member
Reaction score
20
Don't see 'patrol' on the list ;[ Did you mean follow? If so I tried that first and it didn't work either
 

ArmyOfFrogs

New Member
Reaction score
20
Lol i think i caught it..
I had

Set Wisp[1] = (Units owned by Player 1 (Red) matching ((unit-type of (Picked unit)) Equal to Archer))

rather than

Set Wisp[1] = (Units owned by Player 1 (Red) of type Archer)

Hold on, seeing if that works.

Edit: Did not work.

Assign
Trigger:
  • Events
    • Time - Elapsed game time is 16.00 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (actions)
        • Loop - Actions
          • Set Wisp[1] = (Units owned by Player 1 (Red of type Archer)
          • Done for each player
      • Trigger - Turn on Move <gen>


Move (initially off)
Trigger:
  • Events
    • Time - Every 1.00 second of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Wisp[1] and do (Unit - Order (picked unit) to Right-Click RedHero)
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Lol you hav matching unit type of picked unit. There is no picked unit
 

ArmyOfFrogs

New Member
Reaction score
20
Yeah caught that and fixed it.. Didn't change the fact that the unit doesn't move to my hero though :[

Edit : caught another problem; my RedHero variable was getting swapped once the unit spawned, didn't have boolean comparison on :p Seeing if that fixes it now.

Haha victory! Lesson learned: Always make sure your variables are staying what you want them to be :p The reason they weren't moving is because they were rightclicking and following themselves ;P
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Dont pick units in trig 1 just set the groups to. Units in playable map area owned by player matching condition matching unit is acher eqaul to true
 
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