HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How To Detect Lvl Of A Hero Spell???

07-06-2003, 02:26 PM#1
STURMguy22
a lot of people are asking this question (including me), so id like someone to answer this. How can u detect the level of a hero skill?
07-06-2003, 03:16 PM#2
HeX-MapMaker
After looking though the World Editor's (The Frozen Throne) conditions list, I did not find any natural way of detecting the current level of a hero skill. However, if there is no front door, a back door solution must exist. I thought of a more artificial method of detecting the level of a hero skill.

Before creating the triggers, you must create a new variable of type Integer (I'll refer it to as SkillLevel soley devoted current level of the skill. The idea here is that you want to increase SkillLevel each time the player puts skill points into that particular skill. For the following trigger, I will refer to the hero as Hero0001, and the particular skill as HeroSkill.

A single trigger is required for this feat.
Trigger 1: Hero Skill Learned
Events:
&nbsp&nbsp&nbspUnit - Hero0001 <gen> Learns a skill
Conditions:
&nbsp&nbsp&nbsp(Learned Hero Skill) Equal to HeroSkill
Actions:
&nbsp&nbsp&nbspSet SkillLevel = (SkillLevel + 1)

That should do the trick. Now, to answer your question, to detect the current skill level, the condition line should read something like this:

Conditions:
&nbsp&nbsp&nbspSkillLevel Equal to x

If you need any clarifications or any additional help, do not hesistate!
07-06-2003, 04:21 PM#3
NavARXIDA
good idea ...

will use it too if u dont mind ;-)


tnx
07-06-2003, 07:29 PM#4
STURMguy22
Quote:
Originally posted by HeX-MapMaker
After looking though the World Editor's (The Frozen Throne) conditions list, I did not find any natural way of detecting the current level of a hero skill. However, if there is no front door, a back door solution must exist. I thought of a more artificial method of detecting the level of a hero skill.

Before creating the triggers, you must create a new variable of type Integer (I'll refer it to as SkillLevel soley devoted current level of the skill. The idea here is that you want to increase SkillLevel each time the player puts skill points into that particular skill. For the following trigger, I will refer to the hero as Hero0001, and the particular skill as HeroSkill.

A single trigger is required for this feat.
Trigger 1: Hero Skill Learned
Events:
&nbsp&nbsp&nbspUnit - Hero0001 <gen> Learns a skill
Conditions:
&nbsp&nbsp&nbsp(Learned Hero Skill) Equal to HeroSkill
Actions:
&nbsp&nbsp&nbspSet SkillLevel = (SkillLevel + 1)

That should do the trick. Now, to answer your question, to detect the current skill level, the condition line should read something like this:

Conditions:
&nbsp&nbsp&nbspSkillLevel Equal to x

If you need any clarifications or any additional help, do not hesistate!



well i know how to do that, but the problem is, that works for the original hero spells. I need to do this with a custom spell and i dont see anywhere where i can type in the code, its just a drop down
07-06-2003, 07:31 PM#5
dataangel
Isn't there an integer function for this? I could've sworn...
07-06-2003, 07:35 PM#6
STURMguy22
well if u figure it out dataangel, dont hesitate to tell me, but arche already cleared it up for me by just taking it to custom text which i never thought of.
07-08-2003, 08:51 PM#7
KenjiMcCloud
I had the idea with the variable before and I think it's rather uncomplicated compared to what comes afterwards.
Quote:
Conditions:
(Learned Hero Skill) Equal to HeroSkill
This is impossible. The possible ingredients for a Hero Skill comparison are only the Event Respone "Learned Hero Skill", the hero skills used in the campaign and the normal hero skills, i.e. MB, FS, Blizzard etc...
You can't enter a variable, nor can you enter a custom hero skill. I tried to do it in JASS, but the "A***:A***" format isn't accepted. It returns an error.

Imo, this is a ridiculous limitation. Just the same as the Max Speed being capped at 400...
07-08-2003, 09:32 PM#8
Dead-Inside
And the answer is... Dun dun dun...
Make a trigger with your custom spell somewhere... Convert it to custom text, copy the code... Implent it in your Event.