I'm trying to make an ability that removes behaviors from surrounding enemies and heals the caster for every stack removed. I'm pretty sure this can be done with triggers, but can this be done with data too?
I thought that it might work like this:
Create Persistent -> Periodic Effect = Search with Remove Behavior effect (the behavior can be stacked, that's why persistent + search). And I add a modify unit effect to the behaviors on Effect - Final which targets the caster of the search effect.
But I am not sure this can find my caster because I am not sure this counts as the same effect chain. I can't try it out currently, but if someone has a better idea please tell me.
Oh and my 2nd idea is the following:
Persistent effect again, which runs a search with a set effect. That search contains a modify unit effect which heals for every unit in the radius with a validator that checks for the behavior and a remove behavior effect. If I run this fast enough, this should probably work - question is just if I can make the heal with the validator work.
create a buffA with periodic event instead of creating a persistent effect...
set initial effect to >> "search area" effect with a validator to check if enemy has buffB
then "Set" effect on the search area
and on the "set" effect, create and add 2 effects
remove buffB from enemy
give a new buffC to caster
now on BuffA's periodic effect..
create another "set" effect to heal and remove buffC, also check if theres no more buffC remaining so you can remove buffA
Uh another problem: I need a validator for an behavior that checks for enemies nearby. It should be disabled when enemies are nearby and enabled when there are no enemies.
The enumerate area validator seems a bit stupid, as even the blizzard validator "no enemies nearby" fails. So what values should I put into the validator that it checks for no enemies nearby?
Premade Blizzard validators tend to have bad presets or simply don't represent their name, having been made for a specific application. In this case NoEnemiesNearby also checks allies and neutrals for some reason.
A custom validator works just fine from my experience.
I know, I modified the search filters of course, but it still didn't work.
Another problem:
I am trying to make the following ability. Caster creates 3 units. Those units cloak on attack, have 90% damage reduction and are uncommandable. The caster gets a buff that gives him -1 movespeed, -33% attackspeed and 30% damage reduction - 3 stacks. Whenever one of the unit dies, the caster loses one stack.
So everything works just fine with this ability - but I want those 3 units to behave a bit more intelligently. Currently when they spawn they are ordered to follow the caster, which works quite okay (they attack when he attacks etc. you know how following works). I want them to attack everything in 7 range, but if they move away from the caster too far (10 range) they should follow him again.
Uh, does anyone know how I can make actors for different stacks of an behavior? I just want one actor to have different opacity depending on the stacks of the behavior.
I would apply a buff to the created units on creation via the Create Unit effect that has a death response that removes the other buff stack as a fatal damage response.
Use the Wander behaviour to make them move around and have a buff that uses a Location Range validator to enable a periodic Issue Order to tell them to move back to the caster.
You could also use the Validate Unit term on your actor and have a timer system to update it.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I'm using a enumerate area validator instead of a Location Range validator because I can't connect to the caster unit. Maybe I can play around with some effects, but it's really hard to keep my caster in a effect chain with the summons.
As for the actor. There is an event "behavior level" - you can add a term "level" to that, and that works perfectly.
So e.g. Behavior Level (Behavior) (any)
Term: Level 2
Set Opacity 0.5 makes the actor 50% transparent at 2 stacks.
If the buff is applied via the create unit effect the caster is the unit that created the unit. You can always use the effect field above the value field to refer to a previous effect in that branch of the effect tree to use for determining caster/target etc
Nice to know.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I'm trying to make an ability that removes behaviors from surrounding enemies and heals the caster for every stack removed. I'm pretty sure this can be done with triggers, but can this be done with data too?
I thought that it might work like this:
Create Persistent -> Periodic Effect = Search with Remove Behavior effect (the behavior can be stacked, that's why persistent + search). And I add a modify unit effect to the behaviors on Effect - Final which targets the caster of the search effect.
But I am not sure this can find my caster because I am not sure this counts as the same effect chain. I can't try it out currently, but if someone has a better idea please tell me.
Oh and my 2nd idea is the following: Persistent effect again, which runs a search with a set effect. That search contains a modify unit effect which heals for every unit in the radius with a validator that checks for the behavior and a remove behavior effect. If I run this fast enough, this should probably work - question is just if I can make the heal with the validator work.
Apply the validator to the set effect so the search only can target units with the buff.
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
create a buffA with periodic event instead of creating a persistent effect...
set initial effect to >> "search area" effect with a validator to check if enemy has buffB
then "Set" effect on the search area
and on the "set" effect, create and add 2 effects
remove buffB from enemy
give a new buffC to caster
now on BuffA's periodic effect..
create another "set" effect to heal and remove buffC, also check if theres no more buffC remaining so you can remove buffA
Okay I made it work, if anyone wants to know how then I will write it down.
Uh another problem: I need a validator for an behavior that checks for enemies nearby. It should be disabled when enemies are nearby and enabled when there are no enemies.
The enumerate area validator seems a bit stupid, as even the blizzard validator "no enemies nearby" fails. So what values should I put into the validator that it checks for no enemies nearby?
something like "in combat" validator?
Premade Blizzard validators tend to have bad presets or simply don't represent their name, having been made for a specific application. In this case NoEnemiesNearby also checks allies and neutrals for some reason.
A custom validator works just fine from my experience.
I know, I modified the search filters of course, but it still didn't work.
Another problem:
I am trying to make the following ability. Caster creates 3 units. Those units cloak on attack, have 90% damage reduction and are uncommandable. The caster gets a buff that gives him -1 movespeed, -33% attackspeed and 30% damage reduction - 3 stacks. Whenever one of the unit dies, the caster loses one stack.
So everything works just fine with this ability - but I want those 3 units to behave a bit more intelligently. Currently when they spawn they are ordered to follow the caster, which works quite okay (they attack when he attacks etc. you know how following works). I want them to attack everything in 7 range, but if they move away from the caster too far (10 range) they should follow him again.
I made it work quite acceptable ...
Uh, does anyone know how I can make actors for different stacks of an behavior? I just want one actor to have different opacity depending on the stacks of the behavior.
You can either use ValidateUnit terms in conjunction with Unit Behavior Count validators or send the opacity actor messages via trigger.
I would apply a buff to the created units on creation via the Create Unit effect that has a death response that removes the other buff stack as a fatal damage response.
Use the Wander behaviour to make them move around and have a buff that uses a Location Range validator to enable a periodic Issue Order to tell them to move back to the caster.
You could also use the Validate Unit term on your actor and have a timer system to update 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
I'm using a enumerate area validator instead of a Location Range validator because I can't connect to the caster unit. Maybe I can play around with some effects, but it's really hard to keep my caster in a effect chain with the summons.
As for the actor. There is an event "behavior level" - you can add a term "level" to that, and that works perfectly.
So e.g. Behavior Level (Behavior) (any)
Term: Level 2
Set Opacity 0.5 makes the actor 50% transparent at 2 stacks.
If the buff is applied via the create unit effect the caster is the unit that created the unit. You can always use the effect field above the value field to refer to a previous effect in that branch of the effect tree to use for determining caster/target etc
Nice to know.
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