• 🏆 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!

[Trigger] Level Up Button Show/Hide

Status
Not open for further replies.
Level 11
Joined
Jul 12, 2005
Messages
764
Yeah.. Hide everything, or hide nothing.. As far as i know, you can remove it, but I heared somewhere that if you remove the level-up button, wc will crash.
Anyway, you can remove it with the UnitRemoveAbility function, but i don't know the button's raw code, so i can't help you now..
 
Level 4
Joined
Dec 30, 2006
Messages
84
Since I am messing around with morph abilities...

I a managed to nearly everything that i desired... Only leveluping abilities...
For example:
Normal unit have Shockwave...Then that unit uses morph; I had written the trigger if Unit have Shockwave, then add Warstomp, Set lvl of..., and remove Shockwave... If unit doesn't have Shockwave, Unit will not get Warstomp, since u\unin can level up in the morph form i also made the trigger that if user levels up shockwave, the trigger removes shockwave and levels up warstomp ( or gives unit level1 Warstomp if unit didn't have Shockwave before...)

So now here is the problem.... This two triggers are imperfect... because my spells have maximum level of 4, so if Warstomp is already level 4 there is no point of clicking to level up Shockwave in Level up menu.. Becuase only wastes a Skill point....

I hope someone understand my blabling above...

So I want to hide Level up Button or make a trigger whic will refund Skill point if (read the example above) Warstomp is already level 4, and level up for Shockwave was selected. Because when the unit is morphed she uses different set of spells, so at level up-ing all original spells are not learned yet (you would get level 1 spell).

Otherwise my trigger works fine, only if spell is already level 4; skill points go to waste.. If level up is done correct (Hero user knows when to stop level uping Shockwave...:grin:) then everything is fine...but if not...:witch_doc_sad:
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
thanks for your pm, i have tried to best understand what you are after.

first of all, have you set the maximum level of the abilities to 4? in the abilities editor set it as 4 and they will only be able to learn to level 4. what im trying to understand is why you havent done this, so on the assumption that it isnt possible you should do something like this:

  • Oh Noes
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Learned Hero Skill) Equal to Undead Lich - Frost Nova
    • Actions
      • Wait 0.10 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Frost Nova for (Triggering unit)) Equal to 5
        • Then - Actions
          • Unit - Decrease level of LearnedAbility for (Triggering unit)
          • Hero - Modify unspent skill points of (Learning Hero): Add 1 points
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You Cannot Learn This Skill Past Level 4!
        • Else - Actions
          • Do nothing
test it with and without the wait, i have only included it to make sure it registers the level of the ability after it has been learnt, not before.
 
Status
Not open for further replies.
Top