wewso
New Member
- Reaction score
- 11
I made this a while ago and now I decided to revive it. I find it very useful.
So, I was making my RPG map when I bumped into a problem. I had a hero with a spellbook which contained 11 spells. 5 were normal hero spells that originaly required hero level and 6 were unit spells that didn't reqire level. Ofcourse there was an ultimate that required 12th level. Everything was OK until I went in-game and saw that all the hero spells (including the ultimate) in the spellbook were already learned at level 1 even though i hadnt touched them. I was mad After a short coffee break I solved the problem.
I created an upgrade with 60 levels (max hero level in my map) that would change it's level each time my hero gained a level. So when the hero goes to level 34 the upgrade level for the owner of the hero will change to level 34. Then I made the unit abilities require this upgrade and a level of the upgrade, so that they wont show up as learned until the wanted level is gained. This way I also got my unit abilities require hero level.
There are 2 versions of the trigger in the system. One for RPG maps where you use unit abilities on your heroes and spellbooks. And one for maps with many heroes where you want the units to have hero level requireing abilities.
First Version (RPG) Trigger:
Second Version (Mellee) Trigger:
The upgrade is the same for both versions.
"Hero Level" Upgrade (Both Versions)
First you should set all the values of the upgrade to 0. Then set the
name to: "Hero level: 1" for level 1
"Hero level: 2" for level 2
"Hero level: 3" for level 3 ... and so on to the level you want Ofcourse you don't need to type "Hero level" 1000ds of times you can easely do this with "Auto Fill Levels" when you right-click on the value.
NOTE: The name should be "Hero level: <here you put the level>" in order to look like real requrements made by Blizzard.
And last you have to put the name of the Upgrade in "Techtree - Requirements" field and the level required in "Techtree - Requirements - Levels" field of the ability that requires level.
++Rep me if you like it
Here is the map I made to show you.
So, I was making my RPG map when I bumped into a problem. I had a hero with a spellbook which contained 11 spells. 5 were normal hero spells that originaly required hero level and 6 were unit spells that didn't reqire level. Ofcourse there was an ultimate that required 12th level. Everything was OK until I went in-game and saw that all the hero spells (including the ultimate) in the spellbook were already learned at level 1 even though i hadnt touched them. I was mad After a short coffee break I solved the problem.
I created an upgrade with 60 levels (max hero level in my map) that would change it's level each time my hero gained a level. So when the hero goes to level 34 the upgrade level for the owner of the hero will change to level 34. Then I made the unit abilities require this upgrade and a level of the upgrade, so that they wont show up as learned until the wanted level is gained. This way I also got my unit abilities require hero level.
There are 2 versions of the trigger in the system. One for RPG maps where you use unit abilities on your heroes and spellbooks. And one for maps with many heroes where you want the units to have hero level requireing abilities.
First Version (RPG) Trigger:
Code:
Level Up
Events
Unit - A unit Gains a level
Conditions
Actions
Player - Set the current research level of Hero level: 1 to (Hero level of (Triggering unit)) for (Owner of (Triggering unit))
Second Version (Mellee) Trigger:
Code:
Find Max Hero Level
Events
Unit - A unit Gains a level
Conditions
Actions
Set Max_Hero_Level = 0
Unit Group - Pick every unit in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Max_Hero_Level Less than or equal to (Level of (Picked unit))
Then - Actions
Set Max_Hero_Level = (Level of (Picked unit))
Else - Actions
Player - Set the current research level of Hero level: 1 to Max_Hero_Level for (Triggering player)
The upgrade is the same for both versions.
"Hero Level" Upgrade (Both Versions)
First you should set all the values of the upgrade to 0. Then set the
name to: "Hero level: 1" for level 1
"Hero level: 2" for level 2
"Hero level: 3" for level 3 ... and so on to the level you want Ofcourse you don't need to type "Hero level" 1000ds of times you can easely do this with "Auto Fill Levels" when you right-click on the value.
NOTE: The name should be "Hero level: <here you put the level>" in order to look like real requrements made by Blizzard.
And last you have to put the name of the Upgrade in "Techtree - Requirements" field and the level required in "Techtree - Requirements - Levels" field of the ability that requires level.
++Rep me if you like it
Here is the map I made to show you.