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

Disabling Hero Learn

Status
Not open for further replies.
Level 13
Joined
Oct 18, 2013
Messages
691
Can you disable the ability heroes use to learn abilities, then enable it without causing problems?
 
Level 8
Joined
Dec 10, 2006
Messages
67
You can alter the amount of skill points a hero has available. You can set this value to 0 every time said hero gains a level. At a later point under whatever circumstances you choose, the value can be set to something else. This might accomplish the same thing.
 
Level 8
Joined
Dec 10, 2006
Messages
67
I've done something similar in the past. The lack of skill points makes that annoying button go away. If need be, you can always determine how many skill points a hero has gained upon level gain and save them as an accumulative value in one of the unit's custom values before setting the current skill levels to 0.
 
Level 13
Joined
Oct 18, 2013
Messages
691
Uhhh. Can you show a trigger that would do this? Or do I merely have to call ModifyHeroSkillPoints?
 
Level 8
Joined
Dec 10, 2006
Messages
67
Not having skill points won't make the button go away. The button goes away when your spells are all at maximum level.

If this is true in your so-called upgrades, try converting all your hero abliities to unit abilities but leave them multi-level and move them from the hero abilities field to the regular abilities field. For some abilities, it might alse be necessary to adjust the required skill level field. This way you can adjust the level of a given ability as you wish both up and down using trigger actions depending on circumstances you choose. The only downside is that you will lose the ability to distribute skill points in the traditional way. Other than that, the abilities are just as effective and you have considerably more control. On a personal note, taking into account all the things that can be done with triggers and the Object Editor on non-hero units, it seems that, despite their appearant coolness, the actual restrictiveness of using heroes generally makes them more trouble than they're worth.
 
Level 13
Joined
Oct 18, 2013
Messages
691
@Wietlol, Like removing all of the unit's hero abilities? Or maxing them, one of those seems like it has to work! I could manage something like that. Saving their level into an integer var.

@Wyr Haha Yeah, I've thought about using all unit abilities in my map, but it was after a certain point where it would be troublesome to do so. Thus, I decided to stick with the hero abilities. I COULD do the hero to unit ability transfer, but eh.
 
Level 13
Joined
Oct 18, 2013
Messages
691
Yes, all the hero abilities in my map are levelable xD
And I'm content with the generic method of upgrading abilities, I'm sure the people playing my map won't mind.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Generic method?
Like it automatically upgrades?

Anyway, the regular method forces a button on the HUD which you want to remove to get an extra slot.
Upgrading abilities can also be done using normal abilities and level them via triggers.
If you have a command spellbook on the unit (for menu commands, usually for RPG/AOS maps) then you can add leveling to that.
Otherwise, you can make another unit which will have abilities for each levelable ability and use that to trigger the level.
 
Level 13
Joined
Oct 18, 2013
Messages
691
Yes, the regular method. I don't want to permanently remove it, only temporarily to have access to a one time ability.
 
Level 12
Joined
May 20, 2009
Messages
822
Yes, all the hero abilities in my map are levelable xD
And I'm content with the generic method of upgrading abilities, I'm sure the people playing my map won't mind.

You don't have to upgrade abilities. You can specifically set the level to whatever level you want via trigger. IIRC even if the level you want is backwards from the current level. Like it's currently level 5, you can set it back to level 1.
 
Level 13
Joined
Oct 18, 2013
Messages
691
w0t.

I'm confused. The only thing I was asking about is if you could disable the hero learn ability for a period of time. You know, like calling SetPlayerAbilityAvailable as you would for normal abilities, but for the hero learn ability.
 
Status
Not open for further replies.
Top