private constant real MaxHeightStart = 200.0 Returns the initial maximal reachable height.
Как 200 заменить на 200 + инта юнита в переменной х 3?

native GetHeroStr takes unit whichHero, boolean includeBonuses returns integer
native GetHeroAgi takes unit whichHero, boolean includeBonuses returns integer
native GetHeroInt takes unit whichHero, boolean includeBonuses returns integer
я даже больше скажу, ты мог просто конвертировать функцию гуишную и самому посмотреть
function GetHeroStatBJ takes integer whichStat, unit whichHero, boolean includeBonuses returns integer
    if (whichStat == bj_HEROSTAT_STR) then
        return GetHeroStr(whichHero, includeBonuses)
    elseif (whichStat == bj_HEROSTAT_AGI) then
        return GetHeroAgi(whichHero, includeBonuses)
    elseif (whichStat == bj_HEROSTAT_INT) then
        return GetHeroInt(whichHero, includeBonuses)
    else
        // Unrecognized hero stat - return 0
        return 0
    endif
endfunction

private constant real MaxHeightStart = 200.0 + GetHeroInt( whichUnit, true ) * 3.00
`
ОЖИДАНИЕ РЕКЛАМЫ...
28
native GetHeroStr takes unit whichHero, boolean includeBonuses returns integer
native GetHeroAgi takes unit whichHero, boolean includeBonuses returns integer
native GetHeroInt takes unit whichHero, boolean includeBonuses returns integer
я даже больше скажу, ты мог просто конвертировать функцию гуишную и самому посмотреть
function GetHeroStatBJ takes integer whichStat, unit whichHero, boolean includeBonuses returns integer
    if (whichStat == bj_HEROSTAT_STR) then
        return GetHeroStr(whichHero, includeBonuses)
    elseif (whichStat == bj_HEROSTAT_AGI) then
        return GetHeroAgi(whichHero, includeBonuses)
    elseif (whichStat == bj_HEROSTAT_INT) then
        return GetHeroInt(whichHero, includeBonuses)
    else
        // Unrecognized hero stat - return 0
        return 0
    endif
endfunction

private constant real MaxHeightStart = 200.0 + GetHeroInt( whichUnit, true ) * 3.00
Принятый ответ
10
""
native GetHeroStr takes unit whichHero, boolean includeBonuses returns integer
native GetHeroAgi takes unit whichHero, boolean includeBonuses returns integer
native GetHeroInt takes unit whichHero, boolean includeBonuses returns integer
я даже больше скажу, ты мог просто конвертировать функцию гуишную и самому посмотреть
function GetHeroStatBJ takes integer whichStat, unit whichHero, boolean includeBonuses returns integer
if (whichStat == bj_HEROSTAT_STR) then
return GetHeroStr(whichHero, includeBonuses)
elseif (whichStat == bj_HEROSTAT_AGI) then
return GetHeroAgi(whichHero, includeBonuses)
elseif (whichStat == bj_HEROSTAT_INT) then
return GetHeroInt(whichHero, includeBonuses)
else
Unrecognized hero stat - return 0
return 0
endif
endfunction
""

private constant real MaxHeightStart = 200.0 + GetHeroInt( whichUnit, true ) * 3.00
господи точно, ну я и тупой, можно же было конвертнуть)
Спасибо огромное
28
если я не ошибаюсь юнита нельзя создать через глобалку при её объявлении, поэтому и присвоить константное значение с учётом интеллекта героя ты не сможешь, только при инициализации присваивать это всё дело
Чтобы оставить комментарий, пожалуйста, войдите на сайт.