I'm sure there has to be an easy solution to this, but my head is fried and I can't seem to figure it out. I have an ability that creates units around the caster. The created units are not selectable (because I'm not allowing players to deselect their heroes) and ideally they should attack enemies near the caster. It would be great if they attacked the caster's targets specifically, but I don't care as much about that just yet. Each created unit has timed life. The main issue I'm having is that I want them to follow the caster when he moves away, or switch to rally back to the caster if they get too far away from him.
In theory I imagine I could use Arm Magazine to create them rather than the Create Unit effect, but I'm under the impression that using that requires a weapon to be linked to it which I can't do for this map.
I also thought that I could make a simple trigger that forces the created units to move back to the caster when they are outside a region that is attached to him, but in order to do that I'd need them to have variables attached to them via triggers to then manage their whereabouts. Unless I'm thinking too hard about it and there is an easier way, of course.
Currently Working On: My Overwatch addiction.
Magic box god; Suck it Corbo
You just described almost exactly what Blizz did in the HotS campaign. Is that where you got the idea from? If not then looking at HotS mission 2(?) might help.
If it's for a hero, the obvious solution is this:
-Have a Search Area effect that calls an Issue Order to make the caster move to the closest hero;
-Have an Enumerate Area validator that prevents that effect from going off if a hero is nearby;
-Have a behavior on the spawned units that calls the Search Area periodically.
None.
I wonder if 'herd' behaviors can help with this, it would be real simple if they did.
🤙🏾
You just described almost exactly what Blizz did in the HotS campaign. Is that where you got the idea from? If not then looking at HotS mission 2(?) might help.
Which part are you talking about in the campaign? I only remember units using the Arm Magazine method, which I can't do. As far as the idea goes, this is for my Invasion map I started in 2010 so I didn't get it from HotS.
If anything I'm stealing from my SC1 map, Demonic.
If it's for a hero, the obvious solution is this:
-Have a Search Area effect that calls an Issue Order to make the caster move to the closest hero;
-Have an Enumerate Area validator that prevents that effect from going off if a hero is nearby;
-Have a behavior on the spawned units that calls the Search Area periodically.
There are 6 heroes on the map most likely fighting near each other. How would I have them target the specific hero that created them?
EDIT:
I ended up doing it with a trigger, though I'm still curious if there would be a better way with just data (i.e. Issue Order). This trigger doesn't always catch them and most of the time they are moving to try to catch up. Maybe there's something I'm not seeing in the Issue Order effect, but I still can't figure out how I'd make it target the point where that hero is specifically.
Basically I put a dummy behavior on the units and whenever they left a certain distance from the hero, they move back to the point where the hero is. I'm so glad I didn't try to trigger that last night. I was thinking waaaaaaay too hard on this.
Post has been edited 2 time(s), last time on Mar 18 2013, 7:45 pm by DevliN.
Currently Working On: My Overwatch addiction.