HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

SetHeroStr

11-25-2007, 11:46 AM#1
cohadar
native SetHeroStr takes unit whichHero, integer newStr, boolean permanent returns nothing
what would be the use of putting false for permanent?
11-25-2007, 03:50 PM#2
burningice95
I'm pretty that adds it on as a bonus, instead of modifying the base attribute.
11-25-2007, 03:54 PM#3
zen87
so that GetHeroStr won't count those added attribute? hmm... i don't think so...
11-25-2007, 04:07 PM#4
DioD
try to use morph spells for testing
11-25-2007, 08:55 PM#5
Silvenon
There's a whole system on how to add bonus attributes, I'm sure it can't be that easy..........can it?
11-26-2007, 08:04 AM#6
Pyrogasm
Though I have no testing to back this up, I my guess would be that if you use false it will show up as green numbers next to the attribute, whereas using true will make it simply modify the normal number.
11-26-2007, 08:15 AM#7
cohadar
Quote:
Originally Posted by Silvenon
There's a whole system on how to add bonus attributes, I'm sure it can't be that easy..........can it?

It can.
11-26-2007, 09:09 AM#8
Malf
Collapse JASS:
function SetHeroStat takes unit whichHero, integer whichStat, integer value returns nothing
    // Ignore requests for negative hero stats.
    if (value <= 0) then
        return
    endif

    if (whichStat == bj_HEROSTAT_STR) then
        call SetHeroStr(whichHero, value, true)
    elseif (whichStat == bj_HEROSTAT_AGI) then
        call SetHeroAgi(whichHero, value, true)
    elseif (whichStat == bj_HEROSTAT_INT) then
        call SetHeroInt(whichHero, value, true)
    else
        // Unrecognized hero stat - ignore the request.
    endif
endfunction

That's straight out of the BJ, so I guess Pyro is right.
11-26-2007, 09:37 AM#9
cohadar
Setting to false does not modify green attributes.
11-26-2007, 10:34 AM#10
zen87
Quote:
Originally Posted by cohadar
Setting to false does not modify green attributes.
just tried, i cant see any difference in setting true or false =\
11-26-2007, 10:34 AM#11
Toadcop
ha lol you are blind =\ (loosers)
Quote:
try to use morph spells for testing
it will be not transfared to the morph form =\ aka reset the bonus. if not perm...