HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A fix for level5 Skills (Black arrow example)

09-29-2003, 01:10 PM#1
Grater
The Dark Ranger was hell to give level5 skills, because silence is really messed up because you cant use the default of disable "spells", and black arrow because you cant use the default of "1" summon.

For silence, I cloned the staff of silence ability which had different defaults, a copy paste job, worked out okay.

For black arrow I was a bit stumped, black arrow (neutral hostile) had the same defaults as the DR's, the orb of darkness didn't work.

Then I had an idea.
Create a new ability from Black Arrow, give it one level and make all the tooltips look exactly like level5 blackarrow. Then when a hero learns level5 blackarrow, disable blackarrow for that player and add the modified Black Arrow (Level 5) to the hero, and it works perfectely! (initially I tried using remove ability - black arrow instead of disable ability for player, this didn't work because it allowed you to learn it again)
Unfortunately it only works for one black arrow using hero per player, and tomes of retraining could be a bother, but neither are an issue in my map.
The only trigger required looks like this, it uses a single integer array variable, and an optional temporary integer variable.
Quote:
Black Arrow Fix
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Neutral Dark Ranger - Black Arrow
Actions
Set tempInt = (Player number of (Owner of (Learning Hero)))
Set BlackArrowLevel[tempInt] = (BlackArrowLevel[tempInt] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackArrowLevel[tempInt] Equal to 5
Then - Actions
Player - Disable Black Arrow for (Player(tempInt))
Unit - Add Black Arrow (Level 5 fix) to (Learning Hero)
Else - Actions

This fix, I believe, could be easily used to make level5 abilities for any skill. And it means theres no need to change the mana cost of skills at lvl5 or any other nonsense :ggani: