Help with Hero Abilities please

Status
Not open for further replies.
Level 1
Joined
Jul 1, 2008
Messages
5
Hi. I am working on a new map and have been trying to let my heroes add Int, Str, and Agil points via stat points when they level up. I finally figured out how to get it to add points by making abilities and using triggers. The trouble I am having is that when my hero uses an ability to increase a stat by one the ability goes away and cant be used again. I am wondering how I can get the increase specifiic stat ability to stay so that at every level you can add Str, Int, or Agil. Also I am having trouble adding stat points to the hero when it levels up. I wrote a trigger to add 3 points at every level up to level 10. But it only works when my heroes level up once and then never again?? I have searched google and these forums for an answer but have been unsuccesful finding anything. Any help would be much appreciated.
 
Level 7
Joined
Jul 1, 2008
Messages
1,025
hmm couldnt you post us the trigger?

I'm no expert so this might not work but couldnt you add the stats by giving the hero items as he levels up. Example

  • Event: Hero learns ability
  • Condition: Ability being learnt equal to (your costum ability)
  • Action: Give triggering unit item: Tome of agility+1
The item should automaticaly be used as the hero aquires it and increase his/her agility by 1 permanently. Sorry if this is wrong or what you already tried, just my guess.
 
Level 11
Joined
Oct 20, 2007
Messages
342
there got a skill available on object editor "Attribute Bonus" his code is "Aamk"
ctrl + D to see the code.
u can hide the icon after learn by set Data - Hide Button to true
change the skill to hero than u can learn the skill.
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
My method would to be to have dummy abilities (like a passive that does nothing, maybe based off of channel if you don't want the icon to show) that take the slot of being each attribute you want to increase. You then use a trigger to increase strength, agility, or intellegince.

  • Melee Initialization
    • Events
      • Unit - A unit Learns a skill
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned Hero Skill) Equal to Strength
        • Then - Actions
          • Hero - Modify Strength of (Learning Hero): Add 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned Hero Skill) Equal to Agility
        • Then - Actions
          • Hero - Modify Agility of (Learning Hero): Add 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned Hero Skill) Equal to Intelligence
        • Then - Actions
          • Hero - Modify Intelligence of (Learning Hero): Add 1
        • Else - Actions
 
Level 1
Joined
Jul 1, 2008
Messages
5
My method would to be to have dummy abilities (like a passive that does nothing, maybe based off of channel if you don't want the icon to show) that take the slot of being each attribute you want to increase. You then use a trigger to increase strength, agility, or intellegince.

  • Melee Initialization
    • Events
      • Unit - A unit Learns a skill
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned Hero Skill) Equal to Strength
        • Then - Actions
          • Hero - Modify Strength of (Learning Hero): Add 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned Hero Skill) Equal to Agility
        • Then - Actions
          • Hero - Modify Agility of (Learning Hero): Add 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned Hero Skill) Equal to Intelligence
        • Then - Actions
          • Hero - Modify Intelligence of (Learning Hero): Add 1
        • Else - Actions

First thanks very much for the help.
But my apologies for not being clear in my original post. I worked it out to add 1 str,agil or int with a custom ability and a couple triggers. My problem is abilities can only have so many levels (max 100) after that the ability doesnt show up in the heroes learnable abilities. I am wondering how to get it to stay there for the whole game.
 
Level 7
Joined
Jul 1, 2008
Messages
1,025
hmmm, maybe you could go over 100 levels by creating a counter, (don't ask me how but I know they can be done).

Event: Unit learns ability
Condition: Ability being learnt equal to (lets say your ability gives him +1 agil every time)
Action: add 1 to counter

Event: Counter x reaches 100
actions: Remove ability from hero (your ability)
Give hero +100 agility
Give hero ability (your new ability here with 100 levels)

That way the hero can continue learning the ability and keep all the previous +agilitys, of course it would show up as having a learning count of 1-100 again but that would only be visual. I have no idea whether that would actualy work, i dont have WE installed on this comp so can't give it a try.
 
Level 1
Joined
Jul 1, 2008
Messages
5
hmmm, maybe you could go over 100 levels by creating a counter, (don't ask me how but I know they can be done).

Event: Unit learns ability
Condition: Ability being learnt equal to (lets say your ability gives him +1 agil every time)
Action: add 1 to counter

Event: Counter x reaches 100
actions: Remove ability from hero (your ability)
Give hero +100 agility
Give hero ability (your new ability here with 100 levels)

That way the hero can continue learning the ability and keep all the previous +agilitys, of course it would show up as having a learning count of 1-100 again but that would only be visual. I have no idea whether that would actualy work, i dont have WE installed on this comp so can't give it a try.

Thanks for the reply but the problem is how do i -Give hero ability (your new ability with 100 levels- i see no -action- that does this?? the only thing i have seen is to -learn ability- and -add ability- but neither do what i am lookin for something like -allow hero to learn ability (my ablility here)-

Abewell

EDIT:
I'll write something else so maybe everyone will better understand what i am looking for. I am tryin got make a system like -the black road- has so that when a hero lvls up he/she can add stats to him/herself. I wrote a trigger/ability pair to do this but i dont know how to make the ability infinitely learnable for the hero??
 
Last edited by a moderator:
  • Angry
Reactions: Rui
Level 3
Joined
Jun 25, 2008
Messages
65
Marshmalo means this:

Event: a Unit learns a ability
Condition: Ability being learnt equal to (YourAbility)
Action: Set Counter = Counter + 1

Event: Counter reaches 100
Actions: Remove Ability from (YourUnit) (YourAbility)
Hero - Increase Stats (YourUnit) by 100 Agility ////// (I think thats the name of it)
Unit - Add Ability (YourAbility) to (YourUnit)
Set Counter = 0

Then you only have to get the (YourUnit)... Maybe store it in a variable at mapstart.
And if the map is for more than 1 player its a way more difficult ;)
 
Status
Not open for further replies.
Top