I want to make it so that when your targets health is below 20% you will be allowed to use an ability. I made a validator that is compare, less than or equal to a fraction of 20. The ability works but at any time and the validator does nothing. (I've added the validator as a smart validator for the ability). Does it have something to do with restrictions (although I checked, maybe not good enough)? Or how can I make this work?
The validator you are seeking can be made by modifying Life < 1/4 HP and is used in the show flames on buildings actors. Easy answer to your question make a requirement that requires a hidden behaviour that is disabled if the validator returns false. That way when your hp is under x% the validator is true and the behaviour functions enabling the requirement to show/use the ability.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
What if the ability applied a behaviour to the target unit and then used the behaviour to apply all the effects to the unit? You could put the validator in there maybe?
Obviously the caster would still cast regardless, but the effects would only apply as per validator.
There is most probably a better and easier way.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I want to make it so that when your targets health is below 20% you will be allowed to use an ability. I made a validator that is compare, less than or equal to a fraction of 20. The ability works but at any time and the validator does nothing. (I've added the validator as a smart validator for the ability). Does it have something to do with restrictions (although I checked, maybe not good enough)? Or how can I make this work?
Don't add it as smart validator, add it to the first effect the ability is executing.
The validator you are seeking can be made by modifying Life < 1/4 HP and is used in the show flames on buildings actors. Easy answer to your question make a requirement that requires a hidden behaviour that is disabled if the validator returns false. That way when your hp is under x% the validator is true and the behaviour functions enabling the requirement to show/use the ability.
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
Read the question carefully: He wants to be able to use the ability on TARGETS with <20% life. Not, if he is below 20% himself.
Blah!