Pathing Enemies to attack whatever is closest?

Did you know how to do this?

  • Yes, but I learned something

    Votes: 0 0.0%
  • Kind of, and I learned some things

    Votes: 0 0.0%
  • No, I didn't know how. And i STILL don't!

    Votes: 0 0.0%

  • Total voters
    2

dead-manakin

New Member
Reaction score
5
Hello, I am now working on a copy of survival to see how well I can recreate it / improve it. Right now i am having a few difficulties with the pathing for making monsters spawn every 0.5 seconds and aromatically find a random human player to attack and stay on that person until either: another person attacks it, or another person comes very close to it. So far I have a Trigger that states the following:

Events:
Map initialization
Conditions:

Actions:
Unit Group - Order (Units in (Playable map area) owned by Player 12 (Brown)) to Attack (Random unit from (Units of type Marine))

How could I make it better? Or better yet, completely turn it around and use variables or something.
 

Dirac

22710180
Reaction score
147
if the unit dosnt have visibility of the unit it's supposed to attack, it cant attack it, also it would be better just to add the order to the unit once it's created.
instead of typing your whole trigger here, copy it from the editor using the right click command "copy as text"

PS: is this a poll?
 

dead-manakin

New Member
Reaction score
5
I did copy it from the editor.....

And Yes I want to see how many other viewers know this, like I want to know If im the only person in the world who doesn't know this skill. It shows me how relevant my posts are.
 

Dirac

22710180
Reaction score
147
Was my answer helpful? you didn't say.
It really doesn't matter if you're the only one that doesn't know this
 

dead-manakin

New Member
Reaction score
5
Yes, it is helpful. So if my enemies cant see the heroes they cant attack? Then should I just give them view of the whole map? An how do I measure the distance between two targets? I need to do that to find the closest target.
 

Dirac

22710180
Reaction score
147
When setting a real value look between the BJs (the list of things to do with reals) under Math - Distance between points
 

dead-manakin

New Member
Reaction score
5
Thank you I will try to form a trigger from that :)

Ill post anymore questions I have about the subject here later today.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top