I was curious to know if anyone had a better way of making spawned units attack. Currently I have my spawned units using an attack move to target two locations, with random offsets, then attacking the center of the map, and lastly attacking a unit group (which annoyingly makes them lock onto the first unit of the group). I'm not sure if I'm missing some major data field which would make them aquire targets from across the entire map and attack them continuously (not lose interest after a few seconds). Any help would be appreciated.
You are not quite clear in what you are actually asking, but I'll give a shot at answering! Sorry if the following is not what you are expecting :)
It appears your unit do not comply to the specify orders, so my guess is you might use "Replace existing orders" field (instead of after existing orders).
You might also want to consider using a Pick each unit in unit group and attack every picked unit if your current implementation for unit group is somewhat random.
and don't forget to back up the spawned units in one main unit group and to use this unit group to give orders.
Hope that helps or launch your questioning on the right tracks!
Thanks for the reply, but i think my poor explanation needs work. Firstly though, my first command is a 'replace existing orders' and all subsequent orders are 'after existing orders'.
I have a group of heros in a small square map all belonging to unit group (Players). Every few seconds I spawn a bunch of monsters, assigning each one orders individually as they spawn (attackmove location 1, 2, map center and Players). I would love it if right after the monsters spawned, they would attack the Players regardless of were they were on the map. Also I dont want to simply say 'attack nearest unit in Players' so that if the attacked unit retreats, the monster will attack the next greatest threat.
I use that method for my units in my map (the group attacking periodically) but I cannot have a high update rate as it becomes kinda heavy when the screen is filled with units. My units have an attack unit order directly after spawn and then I update the order each 15 sec. The only problem is that they might be idle for some seconds because of stuns and other disables but that is not a problem on my map. Also I use the idle unit trigger (to trigger when a unit becomes idle like after a stun) but it may not work in some cases for some reason. Another method would be to update attack order along with something else that happens frequently (like when a unit is killed or move every unit will recive a new order). I use unitposition closest to triggering unt/created unit to make my units attack the nearest hero unit.
If you want to see how it works check out the map No Mans land survival on EU servers or just look at my very short trailer on youtube (althou it might not show that great).
Thanks for the input. My map is actually also a survival. Also I am currently using the idle unit trigger to make my non attacking units wandering around the map in the hopes that they will encounter heros
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I was curious to know if anyone had a better way of making spawned units attack. Currently I have my spawned units using an attack move to target two locations, with random offsets, then attacking the center of the map, and lastly attacking a unit group (which annoyingly makes them lock onto the first unit of the group). I'm not sure if I'm missing some major data field which would make them aquire targets from across the entire map and attack them continuously (not lose interest after a few seconds). Any help would be appreciated.
bump
@Ruzial: Go
You are not quite clear in what you are actually asking, but I'll give a shot at answering! Sorry if the following is not what you are expecting :)
It appears your unit do not comply to the specify orders, so my guess is you might use "Replace existing orders" field (instead of after existing orders).
You might also want to consider using a Pick each unit in unit group and attack every picked unit if your current implementation for unit group is somewhat random.
and don't forget to back up the spawned units in one main unit group and to use this unit group to give orders.
Hope that helps or launch your questioning on the right tracks!
Thanks for the reply, but i think my poor explanation needs work. Firstly though, my first command is a 'replace existing orders' and all subsequent orders are 'after existing orders'.
I have a group of heros in a small square map all belonging to unit group (Players). Every few seconds I spawn a bunch of monsters, assigning each one orders individually as they spawn (attackmove location 1, 2, map center and Players). I would love it if right after the monsters spawned, they would attack the Players regardless of were they were on the map. Also I dont want to simply say 'attack nearest unit in Players' so that if the attacked unit retreats, the monster will attack the next greatest threat.
That any better :?
@Ruzial: Go
I think I understand what you want:
You might want to:
1/ Spawn your units, put them in a group, do not order them
2/ Launch a periodic timer and use this timer to attack the heroes positions (not the units themselves)
This way your units should never wander off, and won't be stuck on attacking a specific unit.
Is that it ?
I was hoping there would be something REALLY simple that i missed in the data editor, like War3's unit attack radius and chase time for creep.
.< Thanks for reply anyway. I might switch to your trigger if nothing else crops up
I use that method for my units in my map (the group attacking periodically) but I cannot have a high update rate as it becomes kinda heavy when the screen is filled with units. My units have an attack unit order directly after spawn and then I update the order each 15 sec. The only problem is that they might be idle for some seconds because of stuns and other disables but that is not a problem on my map. Also I use the idle unit trigger (to trigger when a unit becomes idle like after a stun) but it may not work in some cases for some reason. Another method would be to update attack order along with something else that happens frequently (like when a unit is killed or move every unit will recive a new order). I use unitposition closest to triggering unt/created unit to make my units attack the nearest hero unit.
If you want to see how it works check out the map No Mans land survival on EU servers or just look at my very short trailer on youtube (althou it might not show that great).
Thanks for the input. My map is actually also a survival. Also I am currently using the idle unit trigger to make my non attacking units wandering around the map in the hopes that they will encounter heros