I am trying to make an ability which fires a missile, however if the casting unit dies or gets stunned before it hits a target, the missile and all associated effects should immediately disappear. I'm testing this by placing a short duration behavior on the caster which (on expiration) fires a dummy effect that the destroy commands are hooked to, but none of the actors that should be doing "destroy" from the dummy effect are actually doing it. I also hooked a sound to the dummy effect and it plays, so the effect is definitely firing.
I think I figured it out - all my removal effects had their Target: Location set to Target Unit, and apparently the cleanup is targeting the Ultralisk and not whatever the effects were targeting (which is how I thought it worked if I also set an effect). Oddly enough, adding a radius to the destroy persistent effect for my "Search for missile target" persistent ended up destroying the beam.
As for the missile itself, I just made an area search to destroy units matching that type. Had to search area to destroy the any effects applied to my initial target as well. It seems like it's way more complicated than it probably should be, but it works perfectly. If you're interested I can PM you a before and after with a changelog.
I am trying to make an ability which fires a missile, however if the casting unit dies or gets stunned before it hits a target, the missile and all associated effects should immediately disappear. I'm testing this by placing a short duration behavior on the caster which (on expiration) fires a dummy effect that the destroy commands are hooked to, but none of the actors that should be doing "destroy" from the dummy effect are actually doing it. I also hooked a sound to the dummy effect and it plays, so the effect is definitely firing.
Am I missing something?
If in doubt, add an ActorOrphan -> Destroy event, that should destroy the actor in any case, as soon as the associated objects are removed.
I've added that onto the beam with no change.
Could you elaborate, which actor exactly causes the problem and what indicates it?
I think I figured it out - all my removal effects had their Target: Location set to Target Unit, and apparently the cleanup is targeting the Ultralisk and not whatever the effects were targeting (which is how I thought it worked if I also set an effect). Oddly enough, adding a radius to the destroy persistent effect for my "Search for missile target" persistent ended up destroying the beam.
As for the missile itself, I just made an area search to destroy units matching that type. Had to search area to destroy the any effects applied to my initial target as well. It seems like it's way more complicated than it probably should be, but it works perfectly. If you're interested I can PM you a before and after with a changelog.