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!
I have a minor problem. I have a hero with a spell book and I want to add new abilities or increase level of an ability inside it. All the spells that will be added to the spell books are passive abilities.
So how I do that? With GUI please so that I can further improve the system I'm currently making.
Where yourunit is unit variable, abilityId is integer variable with rawcode of your ability, you can get it by clicking Ctrl + D in Object Editor ->Abilities section. Rawcode will replace ability's name. Egzample: 'AHtb' is id of thunderbolt.
'level' is just a number here, enter to which level given ability should be set.
Sadly, I dont have editor around at the moment and its realy late in Poland right now, I can do that for you at morning tomorrow. I asw your ability request, you still require help with it? Can also do this at moring too.
Sorry Pharaoh_ this time miss =) It's about the fact that spellbooks with the same ID will collide and inherit spells.
------------------------------------------------------------
Ok man I see that author of that tutorial haven't told enought.
At first, you have to change base order Id field. When you select it, you gonna see that 'spellbook' doesn't exist, and it is true.
You have to change it to anything else, even: None.
Make sure both spellbooks have the same Id.
Now the next part. MAKE SURE that value in field Minimum amount of Spells in dummy spellbook IS THE SAME as amount of spells you want to add have in dummy spellbook. So you wanted to add 3 spells at once. Value in that field should be at least 3 so.
I updated your map. You can look that I've changed only things I had mentioned above.
I'm gonna write Spellbook tutorial, since that one seems to be outdated.
------------------------------------------------------------
@Maker don't tell me that natives aren't better option here, since you and most of community know that fact.
Both functions:
Unit - Increase level of yourability for (Triggering unit)
Unit - Set level of yourability for (Triggering unit) to X
Truely look like:
JASS:
// Increase level
function IncUnitAbilityLevelSwapped takes integer abilcode, unit whichUnit returns integer
return IncUnitAbilityLevel(whichUnit, abilcode)
endfunction
// Set level
function SetUnitAbilityLevelSwapped takes integer abilcode, unit whichUnit, integer level returns integer
return SetUnitAbilityLevel(whichUnit, abilcode, level)
endfunction
Both do the only, and the same thing: return other function with swapped variables, so considering that our buddy Aeroblyctos wanna move in future to more efficient coding, it would be nice to tell him that natives:
JASS:
// Increase level
native IncUnitAbilityLevel takes unit whichUnit, integer abilcode returns integer
// Set level
native SetUnitAbilityLevel takes unit whichUnit, integer abilcode, integer level returns integer
What cause (even if it's small amount), the improvement of efficiency in his code. I dont think that for him (Aeroblyctos) it generates any problem at all, if we consider first of all that amount of posts and reputation proves that he isn't new to Warcraft Editor and the fact that it's just writing few code lines via Custom script action.
@Maker don't tell me that natives aren't better option here, since you and most of community know that fact.
What cause (even if it's small amount), the improvement of efficiency in his code. I dont think that for him (Aeroblyctos) it generates any problem at all, if we consider first of all that amount of posts and reputation proves that he isn't new to Warcraft Editor and the fact that it's just writing few code lines via Custom script action.
Aha! So here's a great battle between two mighty coders.
I've had very bad memories of a JASS spell book system from the past so I don't want go to that road again where I simply cannot understand anything and must rely on other people. Maker perhaps remembers how frustrating it was to fix that one system... I'm still thankful to you.
I wanted to get rid of the whole system, and made some drastic changes to the gameplay so that it will be more easier and enjoyable to play. Still I wanted to one very simple spell book system and that's why I'm here.
Now everything works and I'm doing good. Now I can even understand how the system works and that is relieving. Thanks so much Maker and Spinnaker.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.