| 10-26-2009, 09:20 AM | #1 |
How do I go about increasing the level of a particular ability in a spellbook? Theres was a topic awhile ago about it but it seems that the suggested solution isnt working for me. |
| 10-26-2009, 10:46 AM | #2 |
Do you mean like a hero skill or a regular ability? In my experience, using SetUnitAbilityLevel works just fine on abilities inside spellbooks. |
| 10-26-2009, 11:31 AM | #3 |
Alternatively... You could simply make a player upgrade, with the function: levels ability (cannot remember the correct syntax now, but it's something in that line), and increments of 1. Then, whenever you want the ability to increase in level, you simply set the player upgrade to one level higher, which then increases the level of the targeted unit ability as well. I played around with something like that in the beginning of the year, and the results were solid. |
| 10-26-2009, 11:34 AM | #4 | |
Quote:
|
| 10-26-2009, 12:35 PM | #5 | ||
Quote:
I decided not to use the upgrade method due to the vast uneccesary object editor work. Quote:
Its for a normal unit ability, i did use that function but it doesnt seem to be working. Perhaps someone could explain how exactly to use this. |
| 10-26-2009, 12:38 PM | #6 | |
Quote:
Use it like this: JASS:call SetUnitAbilityLevel(unit, 'abID', level) |
| 10-26-2009, 12:54 PM | #7 |
Thats exactly what im doing, but its still not working Is there a reason why it may not work? |
| 10-26-2009, 01:00 PM | #8 |
Are you trying to change the spellbooks level? Are you sure the unit has the spelllbook? Are you sure the ability is in there? Are you sure all IDs are correct? |
| 10-26-2009, 01:03 PM | #9 | |
Quote:
Im trying to increase the level of 1 of the spellbooks abilities. Yes the unit has the correct spellbook. Yep the ability is there its simply not leveling up. Yes the Id's are correct. |
| 10-26-2009, 01:06 PM | #10 |
Make sure you do not use this: JASS:native IncUnitAbilityLevel takes unit whichUnit, integer abilcode returns integer but this: JASS:native SetUnitAbilityLevel takes unit whichUnit, integer abilcode, integer level returns integer |
| 10-26-2009, 01:18 PM | #11 | |
Quote:
Ok just tested, it work with other abilities but for some reason the particlular ability im trying to level isnt owrking. Maybe its beacuse its based on charge gold and lumber or some wierd reason. Did somemore testing it seems that it was working all along. However it seems that somehow the tooltip never updates. |
| 10-26-2009, 02:26 PM | #12 | |
Quote:
|
| 10-26-2009, 02:30 PM | #13 | |
Quote:
|
| 10-26-2009, 03:35 PM | #14 |
A handful of bugged abilities don't level effectively or don't show it when they do. This is the only problem ability for you? Also, the spellbook is a little funny if the spellbook ability itself is leveled, in which situation the abilities inside it use the details from their corresponding level, iirc. Now that wasn't confusing. |
| 10-26-2009, 04:49 PM | #15 |
Well i changed the base ability to channel and it works fine now. Previously it was based off "Charge Gold and Lumber". |
