• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to Order Unit Cast skill everytime or anytime on enemy unit?

Status
Not open for further replies.
Level 6
Joined
Mar 9, 2009
Messages
175
How to Order Unit Cast skill everytime or anytime on enemy?
Guys help me please ;):grin::grin:


Thanks you alot :grin::grin:
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
For ordering unit to cast spells click here. mc/defskull/me answered how to do it properly.

Is the unit you want to cast spells neutral? or contrled by a player?
You can use loops. You should know the cooldown for given spell so use:
Lets say cooldown is 6 and your spell is Chain lightning.
  • Loop
    • Events
      • Time - Every 6 seconds of game time
    • Conditions
    • Actions
      • Unit - Order yourUnit to Orc - Far Seer - Chain Lightning uour_target
You can set targets randomly, like picking units around this guy within each loop, but remember about leaks.
Fill yourUnit & yourTarget because this is just egzample here. Yourunit means the caster ofcourse.

EDIT And as Pharaoh_ said, it doesnt realy matter because you just have to choose the spell you have based your ability on.
 
Level 6
Joined
Mar 9, 2009
Messages
175
hmm i not so understand sorry - - , wait u mean if i have custom skill use from Thunder Claps , so i just have to click the Human hero - Thunder Claps?
 
Status
Not open for further replies.
Top