Making each ai unit attack move to a different place

TooSlowFcker

New Member
Reaction score
10
Hey, i made a trigger like this but i have no clue if it works and my goal is to move all units owned by player 12 to attack a different spot every 10 seconds
[i dont know how to loop or use unit arrays, please help
 

LightChaosma

New Member
Reaction score
60
e
every 10 seconds of game
c
a

pick every unit in playble map area owned by player 12 (brown)
order picked unit to (attack-) move to random point in playable map area


thats all there is to it. this however is a MAJOR leak. but it appears your not quitte ready for leak removal
 

TooSlowFcker

New Member
Reaction score
10
yeah but I want to spawn them every 10 seconds, so if i do that, then they either all move to the same place, or one doesn't move >.<
oh and i want each unit to move to a different place every 10 seconds
so
spawn unit
move every 10 seconds
spawn unit
each move to different place 10 seconds
 

LightChaosma

New Member
Reaction score
60
im prettty sure this works fine:

e
every 10 seconds of game
c
a
create 1 unit for player 12 brown
pick every unit in playble map area owned by player 12 (brown)
order picked unit to (attack-) move to random point in playable map area

but if you're not:

Code:
e
every 10 seconds of game
c
a
create 1 unit for player 12 brown
set tempgroup = unit in playble map area owned by player 12 (brown)
set tempint = number of units in tempgroup
for each integer A from 1 to tempint do
     pick 1 unit from tempgroup
          order picked unit to (attack-) move to random point in playable map area
          remove picked unit from tempgroup
 

Trithilon-V2

New Member
Reaction score
20
If you want them to wander.... give them the neutral passive wander ability.

If you want them to attack at random places....just use the trigger above..... But it has a unit group and a point leak.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top