HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

problem with jass

03-22-2004, 12:01 AM#1
Ghost_81st
what does this code really do...

Code:
    set message = ( I2S(key[15]) + ( I2S(key[16]) + I2S(key[17]) ) )
    call DisplayTextToForce( GetPlayersAll(), ( "Hero Level = " + message ) )
    call SetHeroLevel( GetLastCreatedUnit(), S2I(message), true )

I made the code, and when I run it it says "Hero Level = 001"
but it sets the hero to level too level 2.. anyone know why?
03-22-2004, 12:29 AM#2
weaaddar
the SetHeroLevel is wierd. If you give it a number that is below the level of the unit it does nothing, if you igve it a number equal to the cur level it'll raise it by 1.
My suggestion is use SetHeroLevelBJ this is actually one of those rare good bj functions. Also again why can't this be done in the trigger editor?
03-22-2004, 12:36 AM#3
Ghost_81st
truthfully, this could be done with GUI, but I am just trying to learn how to use jass... I was trying to compact my code, and I was just trying to make it more effective. thanks for the answer...
03-22-2004, 12:47 AM#4
ThyFlame
Set it to that level and add a - 1 to that letter.