• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Spellbook passive ability problem

Status
Not open for further replies.
Level 2
Joined
Mar 8, 2011
Messages
9
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?
 
Level 4
Joined
Jul 24, 2010
Messages
85
Add condition: (boolean) Unit having buff stun == false

If the unit have buff stun then the counter will not reset.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
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
 
Status
Not open for further replies.
Top