I have auto attack in my map and my question is does anyone have a simple solution as to when a unit is cloaked the unit will not auto attack and can only manually attack, but if you do attack the unit automatically uncloaks and if it were to go cloaked again while attacking it will stop attacking until ordered to attack again. (or uncloak yourself of course) now i know how to get rid of auto attack (scan filters) but i want him to auto attack when not cloaked, so this i assume would be the use of two attack abilties, but how to overlap an ability with another... i dont know xD
Edit: If its a requirement, could anyone possibly post what this requirement would be? thx
Edit2: Well i figured one thing out, add the caster not attacking validator to the cloak ability, but now that brings another problem, can only cloak when not attacking which wasent the intended effect, just want to stop attacking. and for the life of me i can not seem to figure out.. disable an ability when you have a behavior (buff) and vice versa, disable an ability when you do not have the behavior, ive tried this through requirement.. and sadly its pissing me off O.o
I made a skill that does the following:
You cloak and gain a bonus to damage, and if you choose to attack that first hit deals the extra damage but removes the cloak.
My first problem was that the unit was auto-attacking and breaking cloak instantly. To prevent this, I set the Passive flag in the cloak behavior's State Flags.
The next problem was that if unit is already attacking when ordered to cloak, the attack was still executed and cloak was broken. To remedy this, I created a new behavior, with a duration of 0.1 and Attack checked in Ability Classes Disabled. This behavior is then applied before the cloak. It has the side effect of making the Attack button flash grey for a moment (i.e. 0.1 seconds), but it does the job.
actually i found a somewhat fix of my own, instead of having the (caster not attacking validator) in the ability put it on the cloak behavior itself on either disable or remove depending on what you want (so it can cloak while attacking) - of course atm having remove on is just a waste - and still i cannot find how to stop attacking (if already attacking) when you cloak until done manually, and as for auto attacking while cloaked, i checked my cloak behavior flags and there is no passive flag :(
hehe sorry.. im not exactly new to editor but for some reason with this kinda thing its difficult to remember how to do even the simple things. I actually almost had it working with just using the regular cloak with the single behavior, but for some reason i couldnt attack while cloaked, maybe if i had the attack button on command card and did it that way, but why have them there if there is no one really puts use to them. Plus it also disables the ability to be able to attack your own units and such which is what i want.
But anyway this worked so thank you, just needs a little tweaking and should be good to go.
(and for anybody absolutely new to the editor and comes across reading this, make sure the ability is effect - instant and the behaviors are buffs)
By the way this way doesnt seem to support being able to toggle cloak on and off (as far as i know) but i did find another way to do this with just a changes.
I have auto attack in my map and my question is does anyone have a simple solution as to when a unit is cloaked the unit will not auto attack and can only manually attack, but if you do attack the unit automatically uncloaks and if it were to go cloaked again while attacking it will stop attacking until ordered to attack again. (or uncloak yourself of course) now i know how to get rid of auto attack (scan filters) but i want him to auto attack when not cloaked, so this i assume would be the use of two attack abilties, but how to overlap an ability with another... i dont know xD
Edit: If its a requirement, could anyone possibly post what this requirement would be? thx
Edit2: Well i figured one thing out, add the caster not attacking validator to the cloak ability, but now that brings another problem, can only cloak when not attacking which wasent the intended effect, just want to stop attacking. and for the life of me i can not seem to figure out.. disable an ability when you have a behavior (buff) and vice versa, disable an ability when you do not have the behavior, ive tried this through requirement.. and sadly its pissing me off O.o
I made a skill that does the following:
You cloak and gain a bonus to damage, and if you choose to attack that first hit deals the extra damage but removes the cloak.
My first problem was that the unit was auto-attacking and breaking cloak instantly. To prevent this, I set the Passive flag in the cloak behavior's State Flags.
The next problem was that if unit is already attacking when ordered to cloak, the attack was still executed and cloak was broken. To remedy this, I created a new behavior, with a duration of 0.1 and Attack checked in Ability Classes Disabled. This behavior is then applied before the cloak. It has the side effect of making the Attack button flash grey for a moment (i.e. 0.1 seconds), but it does the job.
Sounds like you're trying to do the same thing.
@Nashadun: Go
actually i found a somewhat fix of my own, instead of having the (caster not attacking validator) in the ability put it on the cloak behavior itself on either disable or remove depending on what you want (so it can cloak while attacking) - of course atm having remove on is just a waste - and still i cannot find how to stop attacking (if already attacking) when you cloak until done manually, and as for auto attacking while cloaked, i checked my cloak behavior flags and there is no passive flag :(
Well, if you need more detail...
Ability
Shadowstride [Level 1]
Effect - Effect: (Dark Templar - Shadowstride [Level 1] (Set))
Effects
Dark Templar - Shadowstride [Level 1] (Set)
Effect - Effects: (Dark Templar - Shadowstride Disable Attack|Dark Templar - Shadowstride [Level 1] (Apply))
Dark Templar - Shadowstride Disable Attack
Behavior - Behavior: Dark Templar - Shadowstride Attack Disable
Unit - Unit - Value: Caster
Dark Templar - Shadowstride [Level 1] (Apply)
Behavior - Behavior: Dark Templar - Shadowstride [Level 1]
Unit - Unit - Value: Caster
Behaviors
Dark Templar - Shadowstride Attack Disable
Ability - Modification - Ability Classes Disabled: Attack - Enabled
Stats - Duration: 0.1000
Dark Templar - Shadowstride [Level 1]
Behavior - Modification - State Flags: Cloak - Enabled, Passive - Enabled
There's all the relevant information of what I have done. Recreate this for your ability, along with your validator if you so wish.
@Nashadun: Go
hehe sorry.. im not exactly new to editor but for some reason with this kinda thing its difficult to remember how to do even the simple things. I actually almost had it working with just using the regular cloak with the single behavior, but for some reason i couldnt attack while cloaked, maybe if i had the attack button on command card and did it that way, but why have them there if there is no one really puts use to them. Plus it also disables the ability to be able to attack your own units and such which is what i want.
But anyway this worked so thank you, just needs a little tweaking and should be good to go.
(and for anybody absolutely new to the editor and comes across reading this, make sure the ability is effect - instant and the behaviors are buffs)
Happy Mapping!! ^^
By the way this way doesnt seem to support being able to toggle cloak on and off (as far as i know) but i did find another way to do this with just a changes.