I've spent some time tinkering in the data editor but it is way to complex for me. I want my Protoss hero to only be able to use the Restore Shields ability when not in combat, and that the ability will only target the hero himself
First, I want the Restore Shields ability to behave similar to Kerrigans Mend ability so that it only add the buff to the units around the hero including the hero himself.
Then I want to grey out the ability if the unit has taken damage within the last 2-4 seconds, making the player unable to press the ability button if the hero has recently been in combat.
The problem with this ability is that if it is used during combat or too early after combat it will cancel itself immediatly thus wasting precious energy. That can be very frustrating for the player.
When I was looking for solution I located a validator that will cancel the ability's behavior if the unit takes damage or have taken damage within some seconds. Is there a way to turn this the other way around so that the ability can only be used if the validator is false?
I might have been a bit foggy with my description on the problems. Sorry about that. I'll try to rearticulate my questions to be more clear.
1. I wonder how I can turn a "target area" spell into an "self-target" spell. Currently you place the Restore Shield ability on the ground and it affects the units within the radius. I want the effect to be centered on the hero that cast the spell, more like Kerrigans "mend" ability.
2. I want the Restore Shield ability to be disabled, or greyed out like on cooldown or not researched, whenever the hero in question takes or gives damage and 3-4 seconds after damage has been dealt or taken. Is there a way to this with either data or triggers?
1. use an effect - instant ability instead of an effect - target ability.
2. add an add behaviour effect to your weapon which is applied to the caster. the behaviour disables the ability and using duration of the buff to set the time.
Yay, I made it just like I visioned it. Thank you for your help.
The only problem I had was attaching the behaviour to the weapon but I solved that using triggers. It's a singleplayer map so internet perfomance is not a big issue.
I've spent some time tinkering in the data editor but it is way to complex for me. I want my Protoss hero to only be able to use the Restore Shields ability when not in combat, and that the ability will only target the hero himself
First, I want the Restore Shields ability to behave similar to Kerrigans Mend ability so that it only add the buff to the units around the hero including the hero himself.
Then I want to grey out the ability if the unit has taken damage within the last 2-4 seconds, making the player unable to press the ability button if the hero has recently been in combat.
The problem with this ability is that if it is used during combat or too early after combat it will cancel itself immediatly thus wasting precious energy. That can be very frustrating for the player.
When I was looking for solution I located a validator that will cancel the ability's behavior if the unit takes damage or have taken damage within some seconds. Is there a way to turn this the other way around so that the ability can only be used if the validator is false?
@njordys: Go
I might have been a bit foggy with my description on the problems. Sorry about that. I'll try to rearticulate my questions to be more clear.
1. I wonder how I can turn a "target area" spell into an "self-target" spell. Currently you place the Restore Shield ability on the ground and it affects the units within the radius. I want the effect to be centered on the hero that cast the spell, more like Kerrigans "mend" ability.
2. I want the Restore Shield ability to be disabled, or greyed out like on cooldown or not researched, whenever the hero in question takes or gives damage and 3-4 seconds after damage has been dealt or taken. Is there a way to this with either data or triggers?
@njordys: Go
1. use an effect - instant ability instead of an effect - target ability.
2. add an add behaviour effect to your weapon which is applied to the caster. the behaviour disables the ability and using duration of the buff to set the time.
@FunkyUserName: Go
Yay, I made it just like I visioned it. Thank you for your help.
The only problem I had was attaching the behaviour to the weapon but I solved that using triggers. It's a singleplayer map so internet perfomance is not a big issue.
Could have just used a Combine validator with inverted logic.
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