HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Adding abilities to spellbooks

06-12-2006, 03:57 AM#1
Sukul
I'm giving an ability to my heroes and for spell storage, I was wanting to use the spellbook ability, then add abilities to it as the hero learned them from dropped books. Its an ability that fits into the main ability inventory for the hero. when it is clicked, its abilities will pop up. I cannot figure out how to add abilities to it like i was saying though. I'm afraid to use variables because it will be a pain to store that data in save codes. Was wondering if anyone could help with this.
06-12-2006, 04:25 AM#2
MercyfulJester
Hmm if those spells have to be learned in a certain definite order (Fireball first, Curse second, Heal third and so on) then you could make levels for the spell book ability and always just add the next spell to the list as the levels go up. Otherwise you could also try to use a sort of counterfeit Spell Book. Every time hero uses Spell Book skill (based on Divine Shield with 0.01 second duration for example) select some sort invisible, otherwise unselectable "caster-unit" which would have the spells the hero has learned (because every time the hero learns a new spell, you just add that spell to the caster unit). Then just make the hero do the casting animation when the "caster-unit" casts the spells.
06-12-2006, 07:02 AM#3
Blade.dk
To add a spell to a spellbook, do this:

1. Create another spellbook ability (it must have the same order id in the object editor as the other one, so if you changed that on the original spellbook, change it here too).
2. Add the ability you want to add to the Hero's spellbook to the spellbook you just created.
3. Disable the newly created spellbook ability for all players. Example:
Trigger:
Disable Spellbook
Collapse Events
Map initialization
Conditions
Collapse Actions
Collapse For each (Integer A) from 1 to 12, do (Actions)
Collapse Loop - Actions
Player - Disable ###Your New Spellbook ability### for (Player((Integer A)))
4. Add the new spellbook ability to the unit with triggers, and the spell inside the new spellbook will show up in the original one. But because it is disabled, the new spellbook itself won't show up.
06-12-2006, 09:50 AM#4
BertTheJasser
Just look at the demomap section and search foor Vex's Spellbock thing.
By the way: This question was answered before.
06-12-2006, 12:05 PM#5
MercyfulJester
Wow that's new information for me too. Thanks.
06-12-2006, 02:29 PM#6
Captain Griffen
Alternatively you can use a binary method to have any combination of up to 6 abilities. Cuts down on object editing, but limited to 6 abilities.