- Joined
- Jul 26, 2008
- Messages
- 57
[SOLVED, PLEASE LOCK]How to make unit go back to following after its done attacking?
I'm trying to make a system in which there is 1 Hero who is controlled by the Player, and then there are 4 other Heroes which are controlled by 4 separate AI-controlled players. All 5 players (the 1 human player and the 4 AI players) are on the same force, so they act as a 5-man Party. Think of it like Kingdom Hearts, where there is 1 character who is controlled by the player (Sora) and then there are 2 other chars. who are controlled by the AI, following Sora (the player) wherever he goes, attacking enemies on their own and comming to the player's aid should they think he needs assistance.
However, there's one aspect of this (so far) that i'm quite confused about as to how i'm supposed to go about triggering it. See, I currently have a trigger that makes all the AI Heroes follow the player's hero as the norm. However, without another trigger that tells them to attack enemies when they come in range, the AI Heroes will never go after any enemy units. They will do nothing except follow the player's Hero unless I trigger them to do otherwise.
The problem with this, however, is the fact that after they're done attacking enemies and there are no more within the AI Hero's sight range, they will not go back to following the player's Hero on their own because they were previously ordered to attack the targets that were within range, and therefore, must be ordered to follow the player's Hero once again or else they will simply stand there doing absolutely nothing until the end of days v_v.
And, well uh, to be frank... I don't know what event or condition (or both) to use that allows me to detect when a unit is done attacking, seeing as that's what I would need in order to make this trigger happen.
Anybody know what I can do to make it happen? Or, does anybody have any ideas as to maybe making a mini-system that can do this? Any help at all is appreciated.
P.S: If making this happen requires Jass or other script, then unless you can provide me with the script, just tell me that i'd need Jass to make it work so that I can go sulk in my corner for the rest of eternity. Because I AM NOT A JASS MAN. I DO NOT HAVE JASS HANDS.

However, there's one aspect of this (so far) that i'm quite confused about as to how i'm supposed to go about triggering it. See, I currently have a trigger that makes all the AI Heroes follow the player's hero as the norm. However, without another trigger that tells them to attack enemies when they come in range, the AI Heroes will never go after any enemy units. They will do nothing except follow the player's Hero unless I trigger them to do otherwise.
The problem with this, however, is the fact that after they're done attacking enemies and there are no more within the AI Hero's sight range, they will not go back to following the player's Hero on their own because they were previously ordered to attack the targets that were within range, and therefore, must be ordered to follow the player's Hero once again or else they will simply stand there doing absolutely nothing until the end of days v_v.
And, well uh, to be frank... I don't know what event or condition (or both) to use that allows me to detect when a unit is done attacking, seeing as that's what I would need in order to make this trigger happen.
Anybody know what I can do to make it happen? Or, does anybody have any ideas as to maybe making a mini-system that can do this? Any help at all is appreciated.
P.S: If making this happen requires Jass or other script, then unless you can provide me with the script, just tell me that i'd need Jass to make it work so that I can go sulk in my corner for the rest of eternity. Because I AM NOT A JASS MAN. I DO NOT HAVE JASS HANDS.

Last edited: