• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

how to change spells depending on skill level???

Status
Not open for further replies.
Level 3
Joined
Oct 22, 2022
Messages
13
So uh, I tried making a skill where your skill set changes after casting a specific aoe skill, I used engineering upgrade for this. Now what I don't know is how to change that aoe spell into a lvl 2 version of said aoe spell the moment you upgrade that skill on the learn ability menu
 

Attachments

  • 2022-10-22 (1).png
    2022-10-22 (1).png
    109.5 KB · Views: 10
  • 2022-10-22 (2).png
    2022-10-22 (2).png
    109.9 KB · Views: 11

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,569
So your usage of the Caster variable in combination with a Wait action is problematic. A global variable can only have one value at a time and is accessible from any trigger at any moment. By using a Wait action with global variables you create an opportunity for your global variables to change to something else. So for example, if another trigger were to Set Caster to a different unit during your 1.00 second Wait then you would no longer be referencing the same Caster as before. You might end up Adding the Wings 12 ability to the wrong unit.

The solution: Delete Caster and use (Triggering unit) instead. It's an Event Response that retains it's value throughout a trigger and can't be changed from outside sources. It acts like a local variable in this manner.

To answer your question, you can detect when a Hero levels up a skill using this Event:
  • Events
    • Unit - A unit Learns a skill
Then you can Increase the level of your other ability using one of these two Actions:
  • Actions
    • Unit - Increase level of Chain Lightning for (Triggering unit)
    • Unit - Set level of Chain Lightning for (Triggering unit) to (Learned skill level)
You can also force a Hero to spend a Skill Point on a desired skill:
  • Hero - Learn skill for (Triggering unit): Chain Lightning

Also, here's how you can post your triggers on Hiveworkshop:
 
Last edited:
Status
Not open for further replies.
Top