| 09-22-2004, 06:06 AM | #1 |
Just when I thought I was done with this stuff, Here I am back again... Anyways, I've been tinkering with a spellbook for a hero and much to my dismay I discovered I can't add Hero abilities to it. So I started kicking around a few ideas as to accomplish the same effect I'm aiming for. My conclusion was a Trigger based "Engineering Upgrade". I esstentially have my hero learn different "passive" Hero abilities that through triggers modify the different abilities in his spellbook. I hit a snag when I remember I don't exactly know that much about triggering :(. The basis behind the idea is simply when a hero learns one of the "Engineering Upgrade" skills, it removes his current spellbook and replaces it with a spellbook containing the upgraded abilities. Sorry for dragging it out, here's the trigger. Can anyone tell me what I did wrong? I am a noob when it comes to this and I'm assuming it's something very simple, but here goes: function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean if ( not ( GetXLearnedSkill(GetLearningUnit()) == 'A000' ) ) then return false endif return true endfunction function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing call UnitRemoveAbilityBJ( 'A001', GetLearningUnit() ) call UnitAddAbilityBJ( 'A005', GetLearningUnit() ) endfunction Also on a side note if there is an easier way to do this by all means please let me know. This was just the first thing that came to mind. |
| 09-22-2004, 10:49 AM | #2 |
Guest | Im doing a similar thing. One where the spellbook is an ability the player has. All you need to do is make a custom ability based from the spellbook, and change it from an item ability to a hero ability. Then set its level to whatever (mines gunna be 5 ^_^ ). The there will be a big list of settings from lvl 1 to 5, in which you can add the appropriate item abilities to the appropriate lvl. All you need to do then is create seperate single lvl item abilities to represent the different spells as the lvl up in the spell book ability: Players Spell Book Ability: lvl 1: Rain of Firelvl1, Fireballlvl1 lvl 2: Rain of Firelvl2, Fireballlvl2 lvl 3: Rain of Firelvl3, Fireballlvl3 Where each spell at each lvl is its own item ability... Err.. I hope I typed that out without being too confusing :\ Hope it helps ^_^ |
| 09-22-2004, 04:47 PM | #3 |
That is a good idea, I'll give it a shot. I still might have to do some Triggering though. For instance I have one of these passive abilities that adds additional casting range to one spell, while at the same time I have another passive ability that adds more damage to the same spell. So I'm assuming I'll have to write a trigger that detects all the passive abilities the hero has and modify his spellbook ability based on those triggers. Anyways, thanks for the feedback, I'll try to pull it off ![]() |
