Snippet Get Map Max Hero Level

Nestharus

o-o
Reaction score
84

Nestharus

o-o
Reaction score
84
Yea, but that requires sad face config ; P


If you change map max hero level, then you have to change it in script too. It's easier to just do it like this = ).
 

Laiev

Hey Listen!!
Reaction score
188
I have 3 questions:

1 - Why textmacro for this?

2 - Why you need UnitStatePercent?
If the 'problem' is to get some hero invisible, just get random hero and do it, noone will see it.

3 - Why you need WorldBounds?
You really don't need to create the hero in a 'safe point in the map'.


This is enough for me:
JASS:

library GetMapMaxHeroLevel
    globals
        private integer m
    endglobals
    function GetMapMaxHeroLevel takes nothing returns integer
        return m
    endfunction
    private module N
        private static method onInit takes nothing returns nothing
            local unit u=CreateUnit(Player(15),'Hvsh',0,0,0)
            call SetHeroLevel(u,10000,true)
            set m=GetHeroLevel(u)
            call RemoveUnit(u)
            set u=null
        endmethod
    endmodule
    private struct I extends array
        implement N
    endstruct
endlibrary
 

tooltiperror

Super Moderator
Reaction score
231
This is probably up there on that list of scripts that make me die a little bit on the inside.

There's no reason to do this when you can simply use a constant.
 

Furby

Current occupation: News poster
Reaction score
144
This is probably up there on that list of scripts that make me die a little bit on the inside.

There's no reason to do this when you can simply use a constant.

Depends, but Nestharus is on snippet-submitting-streak. :D
 

Nestharus

o-o
Reaction score
84
Again, it's easier to do this than to make a constant since you don't have to worry about it past cnp ^)^.

edit
currently doesn't work
 

tooltiperror

Super Moderator
Reaction score
231
Again, integers are your friends.

Graveyarded.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top