[JASS] Spellbook question

Status
Not open for further replies.
Level 3
Joined
Dec 20, 2007
Messages
44
Is it possible to have a unit with a spellbook of abilities, and then allow them to be able to choose 4 of those abilities to be shown outside the spellbook? I tried it with a simple add/remove ability, but that doesn't work if the unit already has a spellbook (doesn't add the ability to the normal interface and removes it from the spellbook when the remove ability is called). Help can be in JASS or GUI, and thanks in advance.
 
Level 7
Joined
Oct 5, 2007
Messages
118
I think, there's a quite simple solution: Copy the abilities and use the copies to be added outside the sb.
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
For every ability inside the spellbook you could make a Channel ability (the spell called Channel). Change that spell to instant cast, no targets required and change the ID so he wont have shared cooldown with the other 'Channel' spells.

Example:

You have a spellbook with 4 of those 'dummy' spells. Storm Bolt, Thunder Clap, Holy Light and Devotion Aura.
Each of those spells have NO effect. Even Devotion Aura isn't passive here.

And ofc the REAL spells. Like the real storm bolt with the flying electric hammer and stuff:D

Then make triggers like this:

  • Events:
  • Unit begins casting an ability
  • Comment - Start effect of ability wont work with the Channel Spell.
  • Conditions:
  • Ability being cast equal to Storm Bolt (dummy)
  • Actions:
  • Unit - Add Storm Bolt (real) to Triggering Unit.
  • Unit - Make Storm Bolt (real) permanent (if the unit can shapeshift)
  • Comment - OPTIONAL:
  • Unit - Remove Storm Bolt (dummy) from Triggering Unit
  • Unit - Add Storm Bolt (spellbook) to Triggering Unit
  • Player - Disable Storm Bolt (Spellbook) for Owner of Triggering Unit
The optional thingy I did was to remove the Storm Bolt button in the spellbook menu, and add a fake storm bolt ability. This can be Evasion with 0% dodge chance or something. This means the hero can't click it twice. You can set the icon of this passive ability to the DISABLED icon from Storm Bolt so it will appear pretty grey so a player knows he can't click on it.:D



It's a really nice idea you had here, I always wanted to make it too.. However I had some problems with the Hotkeys for abilities. Some of them would match. And I used Q, W, E, R hotkeys... So I had to make 4 of the same abilities, but all with different hotkeys.


GL with your map.
if you have more questions i'm glad to help.
 
Status
Not open for further replies.
Top