Spellbook passive ability problem

Status
Not open for further replies.

Lune722

L

Lune722

Okay, I've finished a skill that increases critical chance per hit, currently what I did looks like this:

disabled spellbook (skill with 100 lvls inside)

trigger1->When hero attacks, increase skill inside spellbook. (Stops at lvl 100)
trigger2->When hero is issued any order other than attack, set skill inside spellbook to lvl 1.

It works fine until the hero is stunned, even receiving no further orders the skill resets back to lvl1 when the hero resumes attacking. My question is, how can I make this "counter" not reset when the hero is disabled?

I tought of making a dummy that had the skill as an aura that targets the player heroes and relocating the dummy next to the player every 0.01 seconds, I searched in the forums but someone said that this is very ineficient, also critical strike is not an aura. Suggestions?
 
Add condition: (boolean) Unit having buff stun == false

If the unit have buff stun then the counter will not reset.
 
If the buff thing doesn't work, here's a good alternative. You can detect the "stun" order of the stunned unit. If the condition returns true, don't reset the level. If it returns false, the unit was not stunned, but ordered something else.

  • Untitled Trigger 007
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object // This triggers the order
    • Conditions
    • Actions
      • Custom script: if GetIssuedOrderId() == 851973 then
      • Game - Display to Player Group - Player 1 (Red) the text: True
      • Custom script: else
      • Game - Display to Player Group - Player 1 (Red) the text: False
      • Custom script: endif
 
You guys rock, it's working as intended now. +rep to you guys.
 
Status
Not open for further replies.
Back
Top