• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Is there any way to hide/disable the hero "lear skill" icon?

Status
Not open for further replies.
I'm talking about the red button to the middle right of the hero's command card. I still want my hero to have unspent skill points displayed at his portrait, but i don't want the button to show, or at least not be clickable. Is there any way to do this?

Could i maybe have the Raw ID of the ability so that i can disable it, or trigger a forced UI key?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
It also vanishes when the hero has no abilities that can increase in level anymore.

I mean let's say you have only one ability and it's at max level. Even though you have skill points to spend, the + will disappear.

So one option is to make different versions of abilities. If you want to have three ability levels, create three similar abilities, but with different stats. When you level up abilities, remove the current ability and give him the ability with lvl 2 stats.

You'd have to create the skill learning system, maybe with dialogs.
 
I removed WEU a long time ago. Can't find it in UMSWE.
Anyone who has WEU who can check?
I am quite convinced it is an ability, kinda like spellbook.

I don't actually need the spells inside it or whatever, i just need the unspent skillpoints displayed at the hero portrait, so having an ability ID that i could disable would be best.
 
Well, if it is an executable ability then maybe you can trace when a unit is ordeded to cast it, so that you can add a forced UI key event which closes the window.

I want to deny people from accessing the learning tree, i just give them a dummy hero ability to get to show the unspent skill points on the hero portrait. I use it in triggers to visually display a value, and it would turn out inaccurate if players started training the dummy spell and decrease the ammount of skillpoints.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Well, if it is an executable ability then maybe you can trace when a unit is ordeded to cast it, so that you can add a forced UI key event which closes the window.
None of these register it:
  • Orders
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
This prevents skill learning, but I'm unsure if that really helps you. Why do you want to deny the access to the learning tab? You don't want to show the abilities in it?

JASS:
library SetAbil initializer Init_Abil

    globals
    
        trigger CancelSkillTraning = CreateTrigger()
    
    endglobals

    private function Actions takes nothing returns nothing
        local unit u = GetTriggerUnit()
        local integer abil = GetLearnedSkill()
        local integer level = GetUnitAbilityLevel( u , abil )
        
        if level == 1 then
            call UnitRemoveAbility( u , abil )
        else
            call SetUnitAbilityLevel( u , abil , level - 1 )
        endif
        
        call UnitModifySkillPoints( u , 1 )
        
        if GetLocalPlayer() == GetTriggerPlayer() then
            call ForceUICancel()
        endif
        
        set u = null
    endfunction

    private function Init_Abil takes nothing returns nothing
        call TriggerRegisterAnyUnitEventBJ( CancelSkillTraning , EVENT_PLAYER_HERO_SKILL )
        call TriggerAddAction( CancelSkillTraning , function Actions )
    endfunction
    
endlibrary


PurplePoot said:
Mhm. Crashes the game if I recall correctly.

That's correct.
 
No, i just don't think they have anything to do in the tab at all. i just had to add the ability in there so that the hero can show up unspent skill points on it's portrait display. He is not going to actually use the ability, so it just looks unprofessional for players to be able to see it.

Is it possible to add hero abilities in a disabled spellbook? Or do they only alow normal abilities?
I will try that when i get home.
 
Level 10
Joined
Jul 12, 2009
Messages
318
No, i just don't think they have anything to do in the tab at all. i just had to add the ability in there so that the hero can show up unspent skill points on it's portrait display. He is not going to actually use the ability, so it just looks unprofessional for players to be able to see it.
Oh. Then, just disable that ability for the player (eg. Player - Disable Banish for Player 1 (Red)).

Just tested, and it works.
 
Status
Not open for further replies.
Top