I'm using a Search Area effect on a behavior from the main hero. As he goes around his business, when friendly or other player units come close to the search radius, I'm applying a buff stack that gives him bonus damage and max vital. Since its an aura effect, I need the buff to only be applied once per validated search.
But the other problem is I need the buff to refresh so it doesn't wear out after the short duration. If I put refresh stack, it just keeps stacking the buff indefinitely. I've sort of solved it clumsily by setting the duration of the behavior and the Periodic Search to extremely close values. But the values of the unit can get wonky sometimes and its not clean.
I also tried setting up a behavior on the target as a sort of Marker and then setting a validator on the apply behavior to effect. But The problem with this is you can't refresh the duration since you need to find the target again and refresh the duration. But it keeps finding the target, refreshing the duration, and then adding another stack and another stack. What I need is 1 behavior per target unit the search finds but still refresh that one behavior so the stack doesn't run out. Instead its refreshing the behavior and adding a stack at the same time.
Even talking about what I really need to do in this thread is making my head spin.
Apply a hidden buff to the target units that applies your buff stack back to the caster as the initial effect. Give the target buff a duration that is slightly longer than the refresh period and a Remove Behavior effect for the caster as the final effect to remove a buff stack from the hero if it moves out of range.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
Only issue with that I see is the final behavior on the target buff needs to be a search area effect. There are teleport effects in the game. Lets say the caster gets teleported suddenly across the map, the search radius would need to be large enough to find the caster and remove the buff. That is a lot of large radius searches going on from a lot of minions. Could be laggy. Unless you were thinking about it a different way.
The Effect: Unit - Value field of the Apply/Remove Behavior effects can be set to caster so it is always used on the caster unit irrespective of distance.
That way the presence of the buff on the targets is proportional to distance due to the search refreshing it while the buff stacks on the caster are only linked to the presence or absence of the buff on the targets.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I see.... I never could quite figure out how that system worked....
So to summarize, the Caster is periodically refreshing the buff on the targets. The Target Buff has the initial apply behavior to the caster which is easy enough to do with a search area. And then the final effect on the target buff is a remove behavior effect set to value Caster.
Didn't know you could remove a behavior that way. Seems I've been doing things the hard way for a while lol.
I'm using a Search Area effect on a behavior from the main hero. As he goes around his business, when friendly or other player units come close to the search radius, I'm applying a buff stack that gives him bonus damage and max vital. Since its an aura effect, I need the buff to only be applied once per validated search.
But the other problem is I need the buff to refresh so it doesn't wear out after the short duration. If I put refresh stack, it just keeps stacking the buff indefinitely. I've sort of solved it clumsily by setting the duration of the behavior and the Periodic Search to extremely close values. But the values of the unit can get wonky sometimes and its not clean.
I also tried setting up a behavior on the target as a sort of Marker and then setting a validator on the apply behavior to effect. But The problem with this is you can't refresh the duration since you need to find the target again and refresh the duration. But it keeps finding the target, refreshing the duration, and then adding another stack and another stack. What I need is 1 behavior per target unit the search finds but still refresh that one behavior so the stack doesn't run out. Instead its refreshing the behavior and adding a stack at the same time.
Even talking about what I really need to do in this thread is making my head spin.
Apply a hidden buff to the target units that applies your buff stack back to the caster as the initial effect. Give the target buff a duration that is slightly longer than the refresh period and a Remove Behavior effect for the caster as the final effect to remove a buff stack from the hero if it moves out of range.
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
Only issue with that I see is the final behavior on the target buff needs to be a search area effect. There are teleport effects in the game. Lets say the caster gets teleported suddenly across the map, the search radius would need to be large enough to find the caster and remove the buff. That is a lot of large radius searches going on from a lot of minions. Could be laggy. Unless you were thinking about it a different way.
You can just use the caster system reference so only one search is needed.
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
Sorry,
What's that? Caster System Reference is news to me.
The Effect: Unit - Value field of the Apply/Remove Behavior effects can be set to caster so it is always used on the caster unit irrespective of distance.
That way the presence of the buff on the targets is proportional to distance due to the search refreshing it while the buff stacks on the caster are only linked to the presence or absence of the buff on the targets.
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 see.... I never could quite figure out how that system worked....
So to summarize, the Caster is periodically refreshing the buff on the targets. The Target Buff has the initial apply behavior to the caster which is easy enough to do with a search area. And then the final effect on the target buff is a remove behavior effect set to value Caster.
Didn't know you could remove a behavior that way. Seems I've been doing things the hard way for a while lol.
In short caster buff>search area>apply behavior>buff>apply/remove behavior. You only need one search for applying the buff to the target.
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
There is still so much to learn.... so many unnecessary search effects.