• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Changing Hero abilities

Status
Not open for further replies.
Level 2
Joined
Jul 18, 2010
Messages
9
Hello,

i am working on a Hero which can change his abilites by using his ultimate.
Triggers look like that:

  • Cataclysm ability change land to air
    • Events
    • Conditions
    • Actions
      • Unit - Remove Devour from CATACLYSM_Caster
      • Unit - Remove Firedarts from CATACLYSM_Caster
      • Unit - Add Fire Orb to CATACLYSM_Caster
      • Unit - Set level of Firedarts for CATACLYSM_Caster to CATACLYSM_Level_abi_1
      • Unit - Add Mutated Corruption to CATACLYSM_Caster
      • Unit - Set level of Mutated Corruption for CATACLYSM_Caster to CATACLYSM_Level_abi_2
I got another trigger activating this one, and I also got some for setting the variables and they all work, I guess.
But the problem is, the hero does not get the new abilities. I just made it works one, that he gets the abilites in the on stance but not in the others but he was not able to put skillpoints into them.
And right now, i dont know, how to fix it, even though I was trying for a few hours by now.

Edit
I dont know, that i did, but somehow, magicaly, the abilities do change and they got the correct level. But, the only problem left now is, that in the second stance (the air stance) i can not spend skillpoints on the new abilites. I can only learn the old ones. Which is wrong. You shall be able to learn the abilites you can use in the different stances.





And i just got an other, small problem with the same hero. His ultimate gives him a passive, that every enemy unit, that dies around him, should give him temporary additional damage

  • Cataclysm passive
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Random unit from (Units within 1000.00 of (Position of (Dying unit)) matching ((Matching unit) Equal to CATACLYSM_Caster))) Equal to CATACLYSM_Caster
      • ((Dying unit) belongs to an enemy of (Owner of CATACLYSM_Caster)) Equal to True
      • ((Dying unit) is A structure) Equal to False
    • Actions
      • Unit - Increase level of Item Damage Bonus (+5 Cataclysm) for CATACLYSM_Caster
      • Wait 10.00 seconds
      • Unit - Decrease level of Item Damage Bonus (+5 Cataclysm) for CATACLYSM_Caster
The Item Damage Bonus (+5 Cataclysm) ability is use is simply the item ability with 50 level, each having +5 damage. Starting with 0 bonus damage on level 1. So i could add the ability earlier.
  • Cataclysm variables
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Cataclysm (Ulti ability)
    • Actions
      • Set CATACLYSM_Caster = (Learning Hero)
      • Set CATACLYSM_Level = (Level of Cataclysm (Ulti ability) for (Learning Hero))
      • Unit - Add Item Damage Bonus (+5 Cataclysm) to CATACLYSM_Caster
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Cataclysm passive
    • Events
      • Unit - A unit Dies
    • Conditions
      • Level of Cataclysm for killing unit > 0
      • ((Dying unit) belongs to an enemy of (Owner of Killing unit)) Equal to True
      • ((Dying unit) is A structure) Equal to False
    • Actions
      • Unit - Increase level of Item Damage Bonus (+5 Cataclysm) for Killing unit
      • Wait 10.00 seconds
      • Unit - Decrease level of Item Damage Bonus (+5 Cataclysm) for Killing unit
 
Last edited:
Level 2
Joined
Jul 18, 2010
Messages
9
  • Cataclysm passive
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Random unit from (Units within 1000.00 of (Position of (Dying unit)) matching ((Matching unit) Equal to CATACLYSM_Caster))) Equal to CATACLYSM_Caster
      • ((Dying unit) belongs to an enemy of (Owner of CATACLYSM_Caster)) Equal to True
      • ((Dying unit) is A structure) Equal to False
    • Actions
      • Unit - Increase level of Item Damage Bonus (+5 Cataclysm) for CATACLYSM_Caster
      • Wait 10.00 seconds
      • Unit - Decrease level of Item Damage Bonus (+5 Cataclysm) for CATACLYSM_Caster
works well, regarding event and conditions. But i may take your improvement northeless.
The problem it, that the unit does not get the damage buff. And i dont know the reason.








Just to reexplain my mayor problem:

I got my hero with 2 abilites + ultimate. Using the ultimate shall bring the hero from the ground up in the air, and change exchange both abilites with 2 other abilites which shall have the same level as the old ones. And using the ultimate a second time will bring the hero back to land and change the abilities back.
This works so far. The only problem is, if while in the air, the hero levels up and can spend a skill point, i can not spend it on any of the two new abilites only on the old ones.
 
Last edited:
Level 9
Joined
Nov 19, 2011
Messages
516
Remade abilities useing items skills.

For e.g.:

My_Skill is based on braclet magic damage reduction or atribute bonus. (Icon will not show)
Get variable state as boolean (defoult true).
Get 2 skills (unit-type) that you want to replace. For e.g. Skill1, Skill2.
When hero learn skill (My_Skill) then:

Check state.
Check level of max(Skill1,Skil2).
If 0 then add(if state then Skill1 else Skill2) to your hero, else
If Level of (Skill1) = 0 then set Level of (Skill2) to Level of (My_Skill), else
set Level of (Skill1) to Level of (My_Skill)

When hero uses Ultimate then:

If state then state=false else state=true;


Sry for no codes but I don't have editor right now. I hope you understand idea.
 
Level 2
Joined
Jul 18, 2010
Messages
9
I understand your idea, and that was my first solution aswell. But the problem there is, that it does not look that nice. Because you have the tooltips and spells names of the old spells. I kinda dislike that.
But besides that, it would work.
I could also solve it, by saving the skillpoints. And then make it that way, that you can only spend the points in the land stance, but i also do not like that :(
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Changing hero abilities, as what gets into skill menu, is only possible by Engineering Upgrade ability. My current map has invisible dummy abilities (slots) that get exchanged via Engineering Upgrades. The whole process automatized with object creation and assignments makes this a lot easier of course.
 
Level 9
Joined
Nov 19, 2011
Messages
516
I understand your idea, and that was my first solution aswell. But the problem there is, that it does not look that nice. Because you have the tooltips and spells names of the old spells. I kinda dislike that.
But besides that, it would work.
I could also solve it, by saving the skillpoints. And then make it that way, that you can only spend the points in the land stance, but i also do not like that :(

Looks like you don't. Just set tip this way:

While ground it does:

While air it does:

If you saw Troll Warlord from DotA you should know how it looks.

Check this:
 

Attachments

  • Skill_Switch.w3x
    18.2 KB · Views: 42
Status
Not open for further replies.
Top