I think my version causes "YOU WERE DROPPED" and I have no idea why - please help :)
trigger1:
unit killed ->
killer is hero ->
killer has no behavior "massacrehelper" -> give killer 1 "massacrehelper"
save current kills of killer to variable
behavior: massacrehelper
duration 1 second
combat response: location -> attacker
combat response handled: effect apply 1 "massacrehelper" to caster (self) (refresh buff)
effect final -> masscrerunoutdummy (empty set effect)
trigger2:
effect massacrerunoutdummy is used for player 1-4
print msg: current kills and variable from the start of the massacre
when this is active players get dropped from multiplayer matches but it doesnt drop all players at once and they get dropped at random times.
I only guess that this causes it because its the only new code that I could think of and after deactivating it the "you were dropped" mails stopped (at least I havent gotten any since then...)
so any idea what causes the drops or just a different idea how to implement this?
I experimented with damage responses before, and interestingly enough, if you add a behavior with a damage response during a damage response, it is added, before the damage is done. So the damage instance causing the damage response, which applies the 2nd behavior is still modified by the 2nd behavior. For your example, this causes an infinite loop, because 1 instance of damage adds a stack of the behavior, which reacts to the instance of damage and adds another stack, which again reacts to the same instance, adding another stack etc..
A possible fix would be to delay the application of the behavior by 0.0625 seconds, probably with a persistent effect.
€This is assuming your buff stacks. If it doesn't, I have no idea.
Kueken, your English is great, but your excessive comma usage bothers me at times. If you'd like some pointers on comma usage, let me know; otherwise, I'll continue to suffer in silence.
So how should I find out whether the combat has ended or not?
I could not find a validator for "damage dealt in time" so I cant remove the buff via validator and I dont want to add a trigger with the event "any unit takes damage" because thats usually a bad idea.
Look at Stetman's self-healing buff. It has a validator which checks how long ago Stetman was in combat.
Also, are you wanting multi-kill notifications to occur when a unit kills multiple enemies in a short time period, or when it kills enemies while constantly remaining in combat? If the former, you won't need such a validator and will probably just want to play around with the duration of the stacking dummy buff.
Stetman's self heal uses a "damage taken time" validator but I want to validate "damage dealt time" so skilled players that avoid taking damage arent punished for being awesome.
I want to keep counting the kills as long as the "hero" is constantly attacking (at least 1 attack per second)
btw Ive switched to a 1/16s delayed refresh and it seems to be ok now.
In that case, it might be best to have the units' attacks grant them a dummy buff. That would be a trigger-free method for a countdown to show when a unit hasn't attacked anyone lately.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I think my version causes "YOU WERE DROPPED" and I have no idea why - please help :)
trigger1:
unit killed ->
killer is hero ->
killer has no behavior "massacrehelper" -> give killer 1 "massacrehelper"
save current kills of killer to variable
behavior: massacrehelper
duration 1 second
combat response: location -> attacker
combat response handled: effect apply 1 "massacrehelper" to caster (self) (refresh buff)
effect final -> masscrerunoutdummy (empty set effect)
trigger2:
effect massacrerunoutdummy is used for player 1-4
print msg: current kills and variable from the start of the massacre
when this is active players get dropped from multiplayer matches but it doesnt drop all players at once and they get dropped at random times.
I only guess that this causes it because its the only new code that I could think of and after deactivating it the "you were dropped" mails stopped (at least I havent gotten any since then...)
so any idea what causes the drops or just a different idea how to implement this?
I experimented with damage responses before, and interestingly enough, if you add a behavior with a damage response during a damage response, it is added, before the damage is done. So the damage instance causing the damage response, which applies the 2nd behavior is still modified by the 2nd behavior. For your example, this causes an infinite loop, because 1 instance of damage adds a stack of the behavior, which reacts to the instance of damage and adds another stack, which again reacts to the same instance, adding another stack etc..
A possible fix would be to delay the application of the behavior by 0.0625 seconds, probably with a persistent effect.
€This is assuming your buff stacks. If it doesn't, I have no idea.
@Kueken531
default max stack 1 :/
Ill try the delayed reapply anyways because I got no idea at all
@Zytrug: Go
I don't think that a damage response on your behavior is necessary. You should probably remove it, especially because it's causing issues anyway.
@Kueken531: Go
Kueken, your English is great, but your excessive comma usage bothers me at times. If you'd like some pointers on comma usage, let me know; otherwise, I'll continue to suffer in silence.
@Khalanil1:
So how should I find out whether the combat has ended or not?
I could not find a validator for "damage dealt in time" so I cant remove the buff via validator and I dont want to add a trigger with the event "any unit takes damage" because thats usually a bad idea.
@Zytrug: Go
Look at Stetman's self-healing buff. It has a validator which checks how long ago Stetman was in combat.
Also, are you wanting multi-kill notifications to occur when a unit kills multiple enemies in a short time period, or when it kills enemies while constantly remaining in combat? If the former, you won't need such a validator and will probably just want to play around with the duration of the stacking dummy buff.
@Khalanil1:
Stetman's self heal uses a "damage taken time" validator but I want to validate "damage dealt time" so skilled players that avoid taking damage arent punished for being awesome.
I want to keep counting the kills as long as the "hero" is constantly attacking (at least 1 attack per second)
btw Ive switched to a 1/16s delayed refresh and it seems to be ok now.
@Zytrug: Go
In that case, it might be best to have the units' attacks grant them a dummy buff. That would be a trigger-free method for a countdown to show when a unit hasn't attacked anyone lately.