• 🏆 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!

unit ability spellbook. How to give it abilities with triggers

Status
Not open for further replies.
Level 3
Joined
Feb 19, 2013
Messages
22
I change spell book to a unit ability i copy paste it two and rename it to:
Military
Magic

Then I want for example 1st lvl my hero to learn automatically a specific spell (for example critical striker). That spell i wanto to go to the Military(spellbook).

But i can't find something that learns a spells to a.... spell. A spellbook.

Only that for example (it is easy.) But the other one... Plz some help :)
Hero - Learn skill for (Triggering unit): Critical Strike.
 
Level 11
Joined
Nov 15, 2007
Messages
781
If your map only has one hero per player, you can just disable the spells like so

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player - Disable Flame Strike for Player 1 (Red)
      • Player - Disable Banish for Player 1 (Red)
and then enable them later when the hero is at the appropriate level.

Since this will disable/enable the spells for all units the player controls, however, you'll need to use a different method if players can have more than one hero (MUI).

The MUI method involves creating a spellbook for every individual spell. These spellbooks should share an order ID with the spellbook you want to add the spell to, and all of them should be disabled at map initialization (the spellbooks themselves, not the spells). Then you simply add the disabled spellbook ability to the unit; this will add the spells in that spellbook to the enabled spellbook sharing the same ID.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
1) Create a spell book that has no spells in spell list, set min/max spells to 1/11.
2) Create a spell book for each ability you want to add to the unit
3) Make sure each spell book has the same Base order id
4) ???
5) Profit
 

Attachments

  • Spell Book(2).w3x
    17.2 KB · Views: 54
Status
Not open for further replies.
Top