I made a sticky bomb ability using an apply behavior buff. It works by launching a missile at the enemy or friendly target, once the missile hits I use an apply behavior effect to apply a behavior (as the sticky bomb). The behavior has a duration and a fatal damage response handled to remove the behavior. Upon removal the final effect is to explode. So and the Caster can detonate all sticky bombs with a 2nd ability that executes a search area to remove all the behaviors. Long story short 1 of 3 scenarios can happen.
1.) Sticky Bomb duration behavior ends and the final effect detonates the bomb.
2.) Caster uses secondary ability to detonate all bombs (Running a search area to remove behaviors of the type "Sticky Bomb" and therefore the final effect executes.
3.) The target unit dies, executing the fatal combat damage response and thereby sticky bomb goes off.
It works just fine except for one issue. Each team can pick 1 hero of this type.
So if both teams pick the hero with the sticky bomb ability, they can actually go around detonating each others bombs because of Scenario # 2. Since it uses a remove behavior of type effect.
I've been thinking on this one and not really sure how to solve it since you can't really mark a behavior as originating from a particular player. Also Since I have the ability set so you can use on both friend and enemy (reasons being, it doesn't damage allies but damages enemies only so you can use it to make living moving bombs) that makes it harder to do because otherwise you could simply run the search area to find only enemy targets, but if you want it to find both enemy and ally targets with the bomb, thats why you can detonate other players bombs.
I would get the Effect - Target ability to use a Set effect on the target that can be used as a frame of reference before applying a buff to the caster which as an initial effect applies the detonation buff to the target using the set effect to find the right unit. The second Effect - Instant ability then just needs to remove the buff on the caster which can be validated by the second buff. Alternatively the buff is applied to the target that then applies a buff to the caster which then uses the set effect to target the removal as a final effect.
This works when you set the unit - effect field on the remove behavior to the original set of the first ability, but I want my detonate ability to detonate ALL bombs. Unfortunately it only detonates 1 at a time it seems.
EDIT
Scratch that! Just forgot to make the caster buff stack! Now it works perfectly! Thank you Dr. Super Evil!
I made a sticky bomb ability using an apply behavior buff. It works by launching a missile at the enemy or friendly target, once the missile hits I use an apply behavior effect to apply a behavior (as the sticky bomb). The behavior has a duration and a fatal damage response handled to remove the behavior. Upon removal the final effect is to explode. So and the Caster can detonate all sticky bombs with a 2nd ability that executes a search area to remove all the behaviors. Long story short 1 of 3 scenarios can happen.
1.) Sticky Bomb duration behavior ends and the final effect detonates the bomb.
2.) Caster uses secondary ability to detonate all bombs (Running a search area to remove behaviors of the type "Sticky Bomb" and therefore the final effect executes.
3.) The target unit dies, executing the fatal combat damage response and thereby sticky bomb goes off.
It works just fine except for one issue. Each team can pick 1 hero of this type.
So if both teams pick the hero with the sticky bomb ability, they can actually go around detonating each others bombs because of Scenario # 2. Since it uses a remove behavior of type effect.
I've been thinking on this one and not really sure how to solve it since you can't really mark a behavior as originating from a particular player. Also Since I have the ability set so you can use on both friend and enemy (reasons being, it doesn't damage allies but damages enemies only so you can use it to make living moving bombs) that makes it harder to do because otherwise you could simply run the search area to find only enemy targets, but if you want it to find both enemy and ally targets with the bomb, thats why you can detonate other players bombs.
I would get the Effect - Target ability to use a Set effect on the target that can be used as a frame of reference before applying a buff to the caster which as an initial effect applies the detonation buff to the target using the set effect to find the right unit. The second Effect - Instant ability then just needs to remove the buff on the caster which can be validated by the second buff. Alternatively the buff is applied to the target that then applies a buff to the caster which then uses the set effect to target the removal as a final effect.
You can also use caster history.
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
Let me see if I get this logic straight.
This works when you set the unit - effect field on the remove behavior to the original set of the first ability, but I want my detonate ability to detonate ALL bombs. Unfortunately it only detonates 1 at a time it seems.
EDIT
Scratch that! Just forgot to make the caster buff stack! Now it works perfectly! Thank you Dr. Super Evil!