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

Maximum Hero lvl without

Status
Not open for further replies.
Level 3
Joined
Jul 19, 2014
Messages
38
Hi! Its the second time i creat a thread (not the same, of course) in less than 24 hours, so im a little bit ashamed and, well, whatever. My problem is i cant set a maximum lvl to my hero by normal mode. I only know setting that through gameplay constants, but if i do so, then i will unable to put heroes above that lvl.
Resumed: How do i put a maximum lvl just for 1 hero? (thanks for reading)
 
Level 15
Joined
Aug 7, 2013
Messages
1,337
In order to customize max hero levels, you will probably need to do your own system.

You'll need a data structure attached to each hero, which has an integer value that tells you the maximum level that hero can reach. When that hero levels up, you check to see if it is over its maximum level. If so, take off all levels until it is at its maximum (if it went above maximum).

A more effective treatment would be to do your own exp system. That way, a hero cannot gain exp if they are already at their max level, which would give you the customization you want.

However there might be a more straightforward solution. Waiting on that.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
seth, your system is not really that great because you will still see the xp bar moving up. There is however, GUI function that disables hero experience gain, you can use that with conjuction of the data structure(array is sufficient if you have unit indexer, hashtable otherwise I would guess) that seth mentioned
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
I think this probably fits your needs:
(of course you have to insert the numbers and units for your map)
  • Experience limit
    • Events
      • Unit - Blood Mage 0000 <gen> Gains a level
    • Conditions
      • (Hero level of Blood Mage 0000 <gen>) Equal to 2
    • Actions
      • Trigger - Turn off (This trigger)
      • Hero - Set Blood Mage 0000 <gen> experience to 499, Hide level-up graphics
      • Hero - Disable experience gain for Blood Mage 0000 <gen>
 
Level 3
Joined
Jul 19, 2014
Messages
38
I think this probably fits your needs:
(of course you have to insert the numbers and units for your map)
  • Experience limit
    • Events
      • Unit - Blood Mage 0000 <gen> Gains a level
    • Conditions
      • (Hero level of Blood Mage 0000 <gen>) Equal to 2
    • Actions
      • Trigger - Turn off (This trigger)
      • Hero - Set Blood Mage 0000 <gen> experience to 499, Hide level-up graphics
      • Hero - Disable experience gain for Blood Mage 0000 <gen>
Yes! that would work perfectly! But... i cant find the condition you put there... where did you find it?
 
Level 15
Joined
Aug 7, 2013
Messages
1,337
seth, your system is not really that great because you will still see the xp bar moving up. There is however, GUI function that disables hero experience gain, you can use that with conjuction of the data structure(array is sufficient if you have unit indexer, hashtable otherwise I would guess) that seth mentioned

I did not know there was a native that disabled exp gain for a hero. Very helpful.
 
Status
Not open for further replies.
Top