So I want to make a Stealth ability that works similar to Stealth in wow.
The issue is that I want it to break any time the unit uses an ability or attacks, I also want the unit to renter stealth if it stops attacking for about 10 seconds.
I'm thinking it will involve a buff that gets removed when the unit takes an action? I'm just not sure on the best way to do this or not. I could use triggers to basically give the unit perm invisibility and then use a temporary buff on him anytime he attacks or uses an ability that lasts 10 seconds to make him visible?
or is it better to somehow use the effects/behaviors/abilities to do this?
Create a buff with flags 'Suppress cloaking' and a duration of 10. In effects create an effect that applies that buff (make sure it's applied to caster unit) and a set that has the damage and apply behaviour. Then swap the damage effect in the weapon for this set. That means when it attacks it will decloak for 10 seconds and attack. If it attacks whilst decloaked it will reset the 10 second duration.
If I swap the Damage effect for one that gives a buff to the caster unit can i still have it deal damage as well? and what about abilities. or do I need to somehow add the effect to each ability i give the unit?
So I want to make a Stealth ability that works similar to Stealth in wow.
The issue is that I want it to break any time the unit uses an ability or attacks, I also want the unit to renter stealth if it stops attacking for about 10 seconds.
I'm thinking it will involve a buff that gets removed when the unit takes an action? I'm just not sure on the best way to do this or not. I could use triggers to basically give the unit perm invisibility and then use a temporary buff on him anytime he attacks or uses an ability that lasts 10 seconds to make him visible?
or is it better to somehow use the effects/behaviors/abilities to do this?
thanks,
@Ginsupup: Go
Create a buff with flags 'Suppress cloaking' and a duration of 10. In effects create an effect that applies that buff (make sure it's applied to caster unit) and a set that has the damage and apply behaviour. Then swap the damage effect in the weapon for this set. That means when it attacks it will decloak for 10 seconds and attack. If it attacks whilst decloaked it will reset the 10 second duration.
@Ginsupup:
Here, I made a map for you with a "Rogue" (Ghost) and it has the trigger your looking for. So you can just copy it to your map if you want.
Edit:
Before you test the map you also may want to add some Zerglings or something to attack... I forgot to add some stuff to kill.
@wOlfLisK: Go
If I swap the Damage effect for one that gives a buff to the caster unit can i still have it deal damage as well? and what about abilities. or do I need to somehow add the effect to each ability i give the unit?
@Ginsupup: Go
link your weapon to a effect set that contains the damage effect and the apply suppress cloak behavior effect