How to trigger a "Stagger" ability?

Status
Not open for further replies.

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,994
Hello, Hive!

I am interested in doing a Stagger ability (It's an ability from World of Warcraft) but I am uncertain how to trigger it. Any suggestions or ideas?

Stagger: You shrug off attacks, delaying 40% of damage, instead taking it over 10 sec.
P.S: I do not need the ability to be MUI, only 1 unit will be using it at a time.
P.S 2: I do use a Damage Detection System, I can reduce the incoming damage by 40%, question is how to stagger it?
 
Last edited:
Level 13
Joined
Mar 24, 2013
Messages
1,105
Well it really depends on what mechanics you want.

Is the delayed damage lethal? Do the units who initially did the damage need to have the damage credited to them?

If the answer is no to the previous questions. You save the sum of the 40% of damage that was prevented.

Then when stagger ends, you divide the sum of prevented damage by 10. This will give you the "damage", they need to take a second. We'll call it DPS.

You then set the value of their life to current life minus the DPS. In this case you'd need to make sure that if it would kill them, you set their life appropriately to prevent that.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Oh this is a cool idea. I didn't play WoW after the original game so I missed a lot of the later content. Very likely I will put this in my map somehow, too lol.

Anyway, there's a few things to watch out for:
1) The stagger damage needs to not trigger stagger or it will just get really ugly really fast.
2) Are you using JASS? I think GUI will get a little messy and I am so rusty with it that I don't think I can help unless I am at home.

Note: you can turn off the damage system before dealing pure damage to credit the damage without firing the stagger trigger again. You'd need to keep track of who did the damage in this case.
 
Last edited:
Well, i would make it a an array-based buff.

You would require to make two seperate buffs (At best as abilities in disabled spellbooks). The first one for the stagger buff duration (in which the damage is reduced) and the other one as indicator how long the unit still takes damage (Else if the first one runs out the damage that needs to tick out would also be removed).

The first one can be done with a hastable, a unit group with a periodic trigger to get the timer down and a DDS.
The second one is more tricky, because we got more than 1 instance of damge. Thus this needs to be a stacking buff. You could make it into a hashtable, but you would require a complete hashtable for this buff and i personally like to avoid this. (I like to trigger multiple buffs into a single hashtable, but for stacking buffs thats hsrdly possible, since you cant define special children for the buff, since they can go ti indefinitly amounts (well, technically only to like 8155 or something like this) ).

So i would use an array for this. Every point in the array would be advocated to a damage instance with its own 10 sec duration. This wpuld even make it able to make the whole thing MUI.

When i get back tomorrow at my PC i could give it a try to code it for you

Edit: you need also to ask yourself: Do you want to have the stagger damage be reduced twice? Since the deal damage trigger does affect armor/magic resist and fires other DDS triggers you need asking yoursekf if you want to make it just pure life reduction or damage. For example you could still ket DDS systens fire when you got abilities which interact with DPS buffs for synergies. Then you would need to toggle a bolean before furing the damage action on which the stagger buff gets to know that you just dealed staggered damage, but other triggers can still fire.
 
Last edited:
Level 11
Joined
May 16, 2016
Messages
730
I am interested in doing a Stagger ability (It's an ability from World of Warcraft) but I am uncertain how to trigger it. Any suggestions or ideas?
I've attached this map. Enjoy. All procedure is in commentaries in a trigger section.
P.S: I do not need the ability to be MUI, only 1 unit will be using it at a time.
It doesn't problem. My one is for many units with Stagger.
P.S 2: I do use a Damage Detection System, I can reduce the incoming damage by 40%, question is how to stagger it?
Footmans have a Roar ability with Buff "Defenisve thing". Every 10 sec. normal attack triggers stagger if footman has "Dt" buff. Part of damage were absorbed, and returned after few seconds.
I used flexibility system, so you may choose functions from tick period to duration etc.
Disadvantage: If normal attack damage is higher, than max health, it could kill the stagger unit, no matter how strong was you absorb.

This work with dummy spell damage, but i don't know your system of damaging. So it's just an example, that shows a principle of absorbing damage and returning it over time with GDD system.
 

Attachments

  • Stagger By Fruit Forest.w3x
    24.7 KB · Views: 25
Last edited:
Status
Not open for further replies.
Top