• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Spell Book Question

Status
Not open for further replies.
Level 7
Joined
Nov 13, 2006
Messages
243
Ok so i have 3 spell books per hero and they all have 11 spells so in total 33 spells per hero.

So my question is , is there a possibility that whenever the hero learns lets say Spellbook 1 Level 2 to make all abilities level 2 in that spellbook without a trigger?
 
Actually, it is possible. (in a way) For every level of the ability make another ability. Then for each level-up of the spell book, make it use the higher up abilities. (Level 2 of the spell book uses all the level 2 abilities)
 
Could you try re-phrasing that question? I don't really understand. However, JNGP does come with an extension that allows you to merge object editor data.
 
Why not with triggers?
It is easy.
Just make a trigger with hero learns skill event.
Conditions And multiple conditions:
Skill learned is equal to spell book #
Level of spell book # is atleast 2
And the actions
Set level of Ability (the one in the spell book) to curent level of spell book # (you just need to add every ability)
 
should i start telling you why not?

ok , first of all , i have 11 abilities per spellbook , 3 speelbooks per hero, 5 heroes per race and 10 races the rest is math , just think ...

Oh and 10 levels for each spelbook (PS: all spellbooks have different spells)

EDIT:currently developing a system to aid in that
 
Then i would suggest using a single trigger for all the spellbooks(not sure of the final syntax ) but it will be a bit tricky.
Events:
a hero learns an ability
Conditions:
level of ability learned greater than or equal to 2
actions:
(Now i will explain the logic but cannot help with the actual source/trigger)
Get the skill name/id in a variable.
get the all the skills in the book using the variable from above and set them to a variable(array)
Level them all up.
But it is easier said than done. The tricky thing is to get all the spells in the book after that it is child's play. To be honest I'm not sure it is possible.
 
Then i would suggest using a single trigger for all the spellbooks(not sure of the final syntax ) but it will be a bit tricky.
Events:
a hero learns an ability
Conditions:
level of ability learned greater than or equal to 2
actions:
(Now i will explain the logic but cannot help with the actual source/trigger)
Get the skill name/id in a variable.
get the all the skills in the book using the variable from above and set them to a variable(array)
Level them all up.
But it is easier said than done. The tricky thing is to get all the spells in the book after that it is child's play. To be honest I'm not sure it is possible.

i'm jassing it not GUI anyway my project will not use map imported jass ... or triggers ..
 
anyway my project will not use map imported jass ... or triggers ..
Not sure what relevance this has...

Anyway unless you want to 'code' all of the spells (one way or another) you will have to come up with a way(function) 'get'-ing the name of the spell book and returning an array of all the skills in it.
This way you will be able to compact all of the 1650 spells leveling in 30-50 lines(not including the mentioned above function).
 
Status
Not open for further replies.
Back
Top