I have an ability which adds a behaviour to the caster unit. The behaviour is meant to be active only while the target unit keeps near the caster. If the target moves out of a 6 cells radius area around the caster, the behaviour is removed.
To make this ability, I've used (tried to use) channeled behaviours. This way, if the unit moves out of the range of the ability, the channel will be broken and the behaviour will be removed from it. Everything work fine.
The problem is that, when the target unit is killed, the behaviour won't be removed. I've tried to add a "TargetNotDead" validator to both the effect and the ability. I've tried to add this validator to the "remove behaviour" field. Nothing seems to work.
I think I can solve this problem by making a permanent effect which constantly checks this validator, but I think there should be some easier way of doing this. I don't fully understand how channels work, so maybe I've missed something.
Thank you DrSuperEvil. I just had to set the effect field of the validator to the set-behaviour effect. I didn't know what this effect field was used for.
All the effect fields with launch/target etc fields purely tells it what previous effect in that branch of the effect tree to use a a source of reference for the value fields.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I have an ability which adds a behaviour to the caster unit. The behaviour is meant to be active only while the target unit keeps near the caster. If the target moves out of a 6 cells radius area around the caster, the behaviour is removed.
To make this ability, I've used (tried to use) channeled behaviours. This way, if the unit moves out of the range of the ability, the channel will be broken and the behaviour will be removed from it. Everything work fine.
The problem is that, when the target unit is killed, the behaviour won't be removed. I've tried to add a "TargetNotDead" validator to both the effect and the ability. I've tried to add this validator to the "remove behaviour" field. Nothing seems to work.
I think I can solve this problem by making a permanent effect which constantly checks this validator, but I think there should be some easier way of doing this. I don't fully understand how channels work, so maybe I've missed something.
Ignore the pathing validator.
you used validator Combine or simply listed 2? ( the one checking dead) maybe they are by default when listed as OR, you can set to AND in combine
No, I just used the default NotDead validator.
I don't use any other additional validator.
Sorry i thought you use range validator too.
Seems to work ok when you change channeled to channeling
Use a Location Range validator. Also you need to use the effect field to reference what target value so the dafult validator is of no use.
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
Thank you DrSuperEvil. I just had to set the effect field of the validator to the set-behaviour effect. I didn't know what this effect field was used for.
All the effect fields with launch/target etc fields purely tells it what previous effect in that branch of the effect tree to use a a source of reference for the value fields.
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