You could probably add an effect to the the unit's weapon that removes cloak when if fires.
There's also probably a flag in the cloak Behavior Validator (Remove) that you can set. It would be something like Caster Not in Combat or Caster not Attacking.
I made it the 1st way (adding remove behavior effect on weapon). But now I got another problem lol
The unit is auto attacking any enemy who gets in range, so, the cloak behavior is getting off all the time. Is there any way to make the unit only attack when the player orders, instead of just auto attack anyone in range?
Make a trigger with event "Any unit starts attacking", condition "Attacking unit is Dark Templar". Then (and this is the part where i don't know if this works) check if the unit has been ordered to attack. If no, issue order to attacking unit to "stop".
Make a behavior, set the Damage Response Chance to 1, Location to Attacker, and Handled to an effect. This effect can do either one of two things:
1. For toggled cloaking effects (like the ghost) it should be a Remove Behavior that removes the cloak behavior.
2. For permanent cloaking effects (like the DT) it should be an Apply Behavior effect that applies a new behavior with the Suppress Cloak flag set and a duration of however long you want the cloak effect to be disrupted.
Then any cloaked unit which you want to be revealed on attack should have this behavior. Also, if you want them to be revealed when they take damage, it's exactly the same except change Location to Defender.
The trigger way, for some reason I don't know why, didn't work.
Btw, I changed the Stop ability of my hero to Stop (Hold Fire), and now he doesn't attack anymore when you order him to stop.
The only problem now is that, when you order the unit to MOVE, if when he reaches the point there is a nearby enemy unit, he will not be ordered to stop and will attack it, unless you press S to Stop (HoldFire).
Btw, thanks everyone for the spell is working acceptable now, I just would like to improve it in this aspect, cuz it's still annoying that everytime you order the unit to move, he will attack nearby enemies when he finishes the movement path. If someone know how to solve this problem, let me know :P.
If you just want the unit to NEVER auto-acquire targets (not counting attack-move) under the unit's Weapon uncheck Can Initiate Attack. I believe that should work, if not set Minimum Scan Distance to zero.
Tried both
Unchecking the "Can Initiate Attack" option in the Weapon, makes the unit never able to attack
and set Minimum Scan Range to 0 makes no difference at all \;
I made it the 1st way (adding remove behavior effect on weapon). But now I got another problem lol The unit is auto attacking any enemy who gets in range, so, the cloak behavior is getting off all the time. Is there any way to make the unit only attack when the player orders, instead of just auto attack anyone in range?
If no one else has said it, the easiest way to fix this I find is to go into the Data Editor, find your Unit (Ghost, DT, etc), look for a field on the right "Combat - Default Acquire Level"... this can be set from Aggressive, Defensive and Passive. Aggressive obviously means the unit will engage anything within radius. Defensive means he should only attack when attacked, and Passive means he'll just run.
For creating wind walk as in warcraft 3 you must create behavior with modification flags->cloak and passive. Then create effect->type remove behavior->unit+->caster, behavior->wind walk behavior. When, go to wind walk behavior->field damage response->set chanse to 1, set location to attacker, effect ->remove wind walk effect. End.
Now you have wind walk which automatically removes when your unit starts attacking and when you in invis he don't attack unit. :) All others solutions does not work or work not correct. Thanks to all who discuss this, without you i would not have thought of it. Thanks this topic too.
... For creating wind walk as in warcraft 3 you must create behavior with modification flags->cloak and passive. Then create effect->type remove behavior->unit+->caster, behavior->wind walk behavior. When, go to wind walk behavior->field damage response->set chanse to 1, set location to attacker, effect ->remove wind walk effect. End.
Where is "modification flags -> cloak and passive"?
Anyone know how to make the unit lose the Cloak behavior when attacking?
@Metrael: Go
You could probably add an effect to the the unit's weapon that removes cloak when if fires.
There's also probably a flag in the cloak Behavior Validator (Remove) that you can set. It would be something like Caster Not in Combat or Caster not Attacking.
@kaji2: Go
I made it the 1st way (adding remove behavior effect on weapon). But now I got another problem lol The unit is auto attacking any enemy who gets in range, so, the cloak behavior is getting off all the time. Is there any way to make the unit only attack when the player orders, instead of just auto attack anyone in range?
Just an idea:
Make a trigger with event "Any unit starts attacking", condition "Attacking unit is Dark Templar". Then (and this is the part where i don't know if this works) check if the unit has been ordered to attack. If no, issue order to attacking unit to "stop".
@Metrael: Go
The unit would need a Hold Fire ability like the ghost has. It prevents them from automatically engaging units.
Make a behavior, set the Damage Response Chance to 1, Location to Attacker, and Handled to an effect. This effect can do either one of two things:
1. For toggled cloaking effects (like the ghost) it should be a Remove Behavior that removes the cloak behavior.
2. For permanent cloaking effects (like the DT) it should be an Apply Behavior effect that applies a new behavior with the Suppress Cloak flag set and a duration of however long you want the cloak effect to be disrupted.
Then any cloaked unit which you want to be revealed on attack should have this behavior. Also, if you want them to be revealed when they take damage, it's exactly the same except change Location to Defender.
@RileyStarcraft: Go
Thnx, I tried this way and it also works perfectly, as well as adding effects on the weapon to remove the behavior.
@ErrorAsh: Go
@kaji2: Go
The trigger way, for some reason I don't know why, didn't work. Btw, I changed the Stop ability of my hero to Stop (Hold Fire), and now he doesn't attack anymore when you order him to stop. The only problem now is that, when you order the unit to MOVE, if when he reaches the point there is a nearby enemy unit, he will not be ordered to stop and will attack it, unless you press S to Stop (HoldFire).
Btw, thanks everyone for the spell is working acceptable now, I just would like to improve it in this aspect, cuz it's still annoying that everytime you order the unit to move, he will attack nearby enemies when he finishes the movement path. If someone know how to solve this problem, let me know :P.
If you just want the unit to NEVER auto-acquire targets (not counting attack-move) under the unit's Weapon uncheck Can Initiate Attack. I believe that should work, if not set Minimum Scan Distance to zero.
@RileyStarcraft: Go
Tried both Unchecking the "Can Initiate Attack" option in the Weapon, makes the unit never able to attack and set Minimum Scan Range to 0 makes no difference at all \;
Under Scan Filters try excluding Enemy.
So scan-distance is the distance in which the unit auto acquires targets?
@RileyStarcraft: Go
Excluding enemies on scan filter makes the hero only attack if you target an enemy (he will not attack any enemies if you Ground Attack)
Guess i'll just leave it this way, \=
You could just make an auto-cast Hold Fire that's Acquisition is Defensive, although I'm not sure if you can hide the ability.
Under the Unit try changing Default Acquire Level to Passive, or None.
@RileyStarcraft: Go
Perfect solution. Now its working similar to Warcraft 3 Windwalk :P
Ty everyone for the help too
If no one else has said it, the easiest way to fix this I find is to go into the Data Editor, find your Unit (Ghost, DT, etc), look for a field on the right "Combat - Default Acquire Level"... this can be set from Aggressive, Defensive and Passive. Aggressive obviously means the unit will engage anything within radius. Defensive means he should only attack when attacked, and Passive means he'll just run.
No need for triggers. :)
EDIT: Someone already got it lol my bad
Hi all. I found best solution.
For creating wind walk as in warcraft 3 you must create behavior with modification flags->cloak and passive. Then create effect->type remove behavior->unit+->caster, behavior->wind walk behavior. When, go to wind walk behavior->field damage response->set chanse to 1, set location to attacker, effect ->remove wind walk effect. End.
Now you have wind walk which automatically removes when your unit starts attacking and when you in invis he don't attack unit. :) All others solutions does not work or work not correct. Thanks to all who discuss this, without you i would not have thought of it. Thanks this topic too.
http://www.youtube.com/user/RussianMapster
I'm trying to make a windwalk like ability too and I tried the methods above but I'm getting lost because I can't find these fields.
Where is "modification flags -> cloak and passive"?
its a simple buff behavior with the cloak flag set to enabled
I advise you look at these.
http://forums.sc2mapster.com/general/wiki-discussion/20995-info-data-editor-fieldnames/#p1
http://wiki.sc2mapster.com/galaxy/data/behaviors/buff/
Just make a buff behaviour that your ability applies that is removed when your unit has the attack ability queued.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg