I am making a map where a hero has guards with it that help it fight. how do I do this so that they stay near it and fight without having them walk all the way up to it and stare (like Zerglings right clicked on an overlord)
as always first answer to fix the problem will get special thanks on loading screen
Here's what I'd do, assuming I have the same vision in my head that you do.
Let's say there are a couple of units called "Escorts" in the map and you want them to follow your Hero unit. I'd have a repeating timer of a couple seconds and when it triggers, I'd use a "pick each unit in unit group" action, specify the unit group as "units in region matching condition," then say all Escorts in region "Entire Map." Then for the actions I'd order each "Picked Unit" to "Attack" to point "Random Point in Region" and specify the region as "Convert Region to Circle" central point "Position of Hero" and radius 6 or so.
In theory, that would make it so every couple of seconds each Escort is issued a command to attack to a random point surrounding your Hero is a small radius.
Instead of ordering them to attack to a random point in a region around the hero, you could order them to attack to a "Point with Polar Offset" with point "Position of Hero," Radius of 6 or so, and Angle as "Random Angle." This would make them always keep some distance away.
Another way you can do this if you don't like repeating timers via triggers is to give each Escort a behavior that last forever and fires off a useless "Set" effect every couple of seconds. Then make a trigger that fires on Action "Effect Used" and specify the effect you made. Then have it do the same thing as above except without the "Pick each Unit" loop, just have it order the "Triggering Effect Unit Caster" to move to the point you want.
Be sure to check out the extension mod: Hots Custom Map support on NA and EU, Despite the name it greatly expands the roster of options for the default 3 races and is updated all the way to NCO.
Add a ability named magazine (escort) , of the arm magazine class, could base on brood lord hangarset the units it has, and check the stored exterior flag
Make a requirement for the amount you want, and set that under the units you added
I will post screenshot tomorrow, getting some sleep now
Be sure to check out the extension mod: Hots Custom Map support on NA and EU, Despite the name it greatly expands the roster of options for the default 3 races and is updated all the way to NCO.
To post a comment, please login or register a new account.
I am making a map where a hero has guards with it that help it fight. how do I do this so that they stay near it and fight without having them walk all the way up to it and stare (like Zerglings right clicked on an overlord)
as always first answer to fix the problem will get special thanks on loading screen
Hey there!
Here's what I'd do, assuming I have the same vision in my head that you do.
Let's say there are a couple of units called "Escorts" in the map and you want them to follow your Hero unit. I'd have a repeating timer of a couple seconds and when it triggers, I'd use a "pick each unit in unit group" action, specify the unit group as "units in region matching condition," then say all Escorts in region "Entire Map." Then for the actions I'd order each "Picked Unit" to "Attack" to point "Random Point in Region" and specify the region as "Convert Region to Circle" central point "Position of Hero" and radius 6 or so.
In theory, that would make it so every couple of seconds each Escort is issued a command to attack to a random point surrounding your Hero is a small radius.
Instead of ordering them to attack to a random point in a region around the hero, you could order them to attack to a "Point with Polar Offset" with point "Position of Hero," Radius of 6 or so, and Angle as "Random Angle." This would make them always keep some distance away.
Another way you can do this if you don't like repeating timers via triggers is to give each Escort a behavior that last forever and fires off a useless "Set" effect every couple of seconds. Then make a trigger that fires on Action "Effect Used" and specify the effect you made. Then have it do the same thing as above except without the "Pick each Unit" loop, just have it order the "Triggering Effect Unit Caster" to move to the point you want.
Just some food for thought, best of luck!
rut
just have a arm magazine ability with the external flag checked, this is what blizzard did with raynor in the mission lab rat.
http://www.sc2mapster.com/assets/nolanstars-textures/
Be sure to check out the extension mod: Hots Custom Map support on NA and EU, Despite the name it greatly expands the roster of options for the default 3 races and is updated all the way to NCO.
the problem is that I don't want them to be immortal, the hero will respawn them preferably.
and nolanstar, can you elaborate
Add a ability named magazine (escort) , of the arm magazine class, could base on brood lord hangarset the units it has, and check the stored exterior flag
Make a requirement for the amount you want, and set that under the units you added
I will post screenshot tomorrow, getting some sleep now
http://www.sc2mapster.com/assets/nolanstars-textures/
Be sure to check out the extension mod: Hots Custom Map support on NA and EU, Despite the name it greatly expands the roster of options for the default 3 races and is updated all the way to NCO.