I am pretty new to the editor and the forum, I hope this is the right place to ask this question (it may be in data). I am building a Tug Of War game. I have waves of units spawning for each player and attacking the enemy base. To do that until now, I used these steps after a unit was created:
Issue order to unit
Order targeting point
Ability Command: Attack
Target Point: a point in enemy base
This works fine for units that only need to use their auto attacks. Now I am adding units with abilities and I want them to use them (smartly) during the attack. For instance I have a priest (I am using Renee's war3 mod) and I want him to heal allied units and not just use its auto attack. Another example is for a sorceress to use her "polymorph" ability smartly (e.g. only on enemies with more than X life).
I've seen this done in most Tug Of War maps but I have no idea how this is implemented (in data? in triggers? in some AI setting?). For instance, in the Desert Strike mod, the Stalker uses its blink ability after being attacked, the marines use stimpack when they see the enemy, high templar use psionic storm on enemies, etc...
So how can I implement this? Any help will be really appreciated!
Ps: I would like more control on unit behaviors than just issuing some "scan move" which doesn't fully work.
There are lots of fields in there, and for auto cast to work properly a few of them need to be configured. I joined a screen shot of which ones had to be customized for the High Templar - Psi Storm, and here they are in plain text:
(Basic) Ability: Commands + : will have the normal execute and cancel.
(Basic) Stats: Flags + Abort On Alliance Change, Allow Movement, Auto Cast, Auto Cast Initially On, Best Unit, No Deceleration, Require Target Vision, Update Charges On Level Change
Ability: Auto Cast Validators + (High Templar - Psionic Storm U TargetFilters | Psi Storm Test Buff)
Ability: Smart Validators + (Psi Storm Test Buff)
I managed to make the Priest's heal ability and the Ogre Lord's shockwave ability work by configuring the above fields in my map. Afterwards, I just had the units use a "Attack target Point" ability command in my triggers/scripts.
In most cases the "Auto Cast Validators+" will not be needed, since the "Target FIlters+" and "Auto Cast Filters+" already cover a lot of cases.
In the case of the psy-storm there is a "smart validator" which I think isn't related to auto casting. I think it is useful when you select a group of high templars and send a psy-storm, so that only one storm is cast. (A command on regular ability commands, like "Attack", will command all selected units to use their ability).
You could also try attack waves and AI controller. The units will try to keep up with their attack wave and will use tacticalAI functions to cast abilities.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi,
I am pretty new to the editor and the forum, I hope this is the right place to ask this question (it may be in data). I am building a Tug Of War game. I have waves of units spawning for each player and attacking the enemy base. To do that until now, I used these steps after a unit was created:
This works fine for units that only need to use their auto attacks. Now I am adding units with abilities and I want them to use them (smartly) during the attack. For instance I have a priest (I am using Renee's war3 mod) and I want him to heal allied units and not just use its auto attack. Another example is for a sorceress to use her "polymorph" ability smartly (e.g. only on enemies with more than X life).
I've seen this done in most Tug Of War maps but I have no idea how this is implemented (in data? in triggers? in some AI setting?). For instance, in the Desert Strike mod, the Stalker uses its blink ability after being attacked, the marines use stimpack when they see the enemy, high templar use psionic storm on enemies, etc...
So how can I implement this? Any help will be really appreciated!
Ps: I would like more control on unit behaviors than just issuing some "scan move" which doesn't fully work.
Bump
check the flags "autocast" and "autocast on by default" on the ability. the attack order should persist after autocast is done
Yeah, 9 times out of 10 a simple autocast and some validators will do the trick
Thanks for the replies. I found out how to do.
After finding this helpful link: http://www.sc2mapster.com/forums/development/data/13743-how-does-auto-cast-work/ (slightly old), I went on and downloaded the current version of Income Wars uploaded on this website (http://www.sc2mapster.com/maps/income-wars/) and checked out how the high templar uses its ability.
There are lots of fields in there, and for auto cast to work properly a few of them need to be configured. I joined a screen shot of which ones had to be customized for the High Templar - Psi Storm, and here they are in plain text:
I managed to make the Priest's heal ability and the Ogre Lord's shockwave ability work by configuring the above fields in my map. Afterwards, I just had the units use a "Attack target Point" ability command in my triggers/scripts.
In most cases the "Auto Cast Validators+" will not be needed, since the "Target FIlters+" and "Auto Cast Filters+" already cover a lot of cases.
In the case of the psy-storm there is a "smart validator" which I think isn't related to auto casting. I think it is useful when you select a group of high templars and send a psy-storm, so that only one storm is cast. (A command on regular ability commands, like "Attack", will command all selected units to use their ability).
Thanks for sharing, mate!
You could also try attack waves and AI controller. The units will try to keep up with their attack wave and will use tacticalAI functions to cast abilities.