• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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,240
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