I created an ability that sends the caster to the target location with a missile effect, and having it apply and remove a behavior (on the caster) which deals damage to all units it passes through (periodic search with a damage effect). And I want to know if there is any way, to make the damage effect apply a marker, so that it will only be applied to the same unit once on that cast.
You could apply a behavior to the unit taking damage and then add that behavior in the search validator. Give the behavior an appropriate duration so it wears off before the next cast.
If you use a behavior on the caster to apply the damage, I am not sure how to do this with markers. However, if you use a Persistent effect instead, its pretty easy, just check the Match Flags -> ID for the persistent and add a No Markers validator to the damage effect.
I created an ability that sends the caster to the target location with a missile effect, and having it apply and remove a behavior (on the caster) which deals damage to all units it passes through (periodic search with a damage effect). And I want to know if there is any way, to make the damage effect apply a marker, so that it will only be applied to the same unit once on that cast.
@Demtrod: Go
You could apply a behavior to the unit taking damage and then add that behavior in the search validator. Give the behavior an appropriate duration so it wears off before the next cast.
You mean like the colossus beams do?
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
If you use a behavior on the caster to apply the damage, I am not sure how to do this with markers. However, if you use a Persistent effect instead, its pretty easy, just check the Match Flags -> ID for the persistent and add a No Markers validator to the damage effect.
Have the behaviour apply a persistent with the final effect removing it?
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
@BasharTeg: Go This is what I'm currently doing, but it wont allow multiple instances of the ability to be run for a unit at the same time.
@Kueken531: Go Yeah, thanks :)
@DrSuperEvil: Go How would I determine which effect is the right one?
When I use a Destroy Persistent effect, I have to specify where to search and what radius to search in - how do I make sure I remove the right one?
Set it to target the caster or use the field above the value to specify the target of the effect applying the behaviour to your missile unit.
Or just have the persistent use a validator that looks for the behaviour.
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
@DrSuperEvil: Go
made it work by setting it to the Destroy Persistant target to the caster. Thanks :)
So all works, solved?
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
oh, yes - sorry for not checking it off.