| 07-06-2003, 02:26 PM | #1 |
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 |
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:    Unit - Hero0001 <gen> Learns a skill Conditions:    (Learned Hero Skill) Equal to HeroSkill Actions:    Set 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:    SkillLevel Equal to x If you need any clarifications or any additional help, do not hesistate! |
| 07-06-2003, 04:21 PM | #3 |
good idea ... will use it too if u dont mind ;-) tnx |
| 07-06-2003, 07:29 PM | #4 | |
Quote:
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 |
Isn't there an integer function for this? I could've sworn... |
| 07-06-2003, 07:35 PM | #6 |
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 | |
I had the idea with the variable before and I think it's rather uncomplicated compared to what comes afterwards. Quote:
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 |
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. |
