Aph, I tried that, that ability is weird. It didn't work when I did it like that. I couldn't simply disable the ability and give it at level 10. If you can do it, and test it to be working, please do, I'd love to see it.
Here is how I did the heros
function Trig_Upgrade_1_Copy_Conditions takes nothing returns boolean
if ( not ( GetHeroLevel(GetTriggerUnit()) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Upgrade_1_Copy_Func007001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'UC41' )
endfunction
function Trig_Upgrade_1_Copy_Func008001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'EC43' )
endfunction
function Trig_Upgrade_1_Copy_Func009001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'EC45' )
endfunction
function Trig_Upgrade_1_Copy_Func010001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'UC47' )
endfunction
function Trig_Upgrade_1_Copy_Func011001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'EC49' )
endfunction
function Trig_Upgrade_1_Copy_Func012001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC51' )
endfunction
function Trig_Upgrade_1_Copy_Func013001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC53' )
endfunction
function Trig_Upgrade_1_Copy_Func014001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC55' )
endfunction
function Trig_Upgrade_1_Copy_Func015001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'OC57' )
endfunction
function Trig_Upgrade_1_Copy_Func016001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'EC60' )
endfunction
function Trig_Upgrade_1_Copy_Func017001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'HC62' )
endfunction
function Trig_Upgrade_1_Copy_Func018001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'HC64' )
endfunction
function Trig_Upgrade_1_Copy_Func019001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'HC66' )
endfunction
function Trig_Upgrade_1_Copy_Func020001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'HC68' )
endfunction
function Trig_Upgrade_1_Copy_Func021001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'HC70' )
endfunction
function Trig_Upgrade_1_Copy_Func022001 takes nothing returns boolean
return ( udg_NewHeroType == 'eC30' )
endfunction
function Trig_Upgrade_1_Copy_Func029003001 takes nothing returns boolean
return ( udg_SavedItems[GetForLoopIndexA()] != GetItemTypeId(null) )
endfunction
function Trig_Upgrade_1_Copy_Actions takes nothing returns nothing
set udg_Player7 = ( udg_Player7 + 1 )
set udg_NewHeroType = 'eC30'
set udg_NewHeroPlayer = GetOwningPlayer(GetTriggerUnit())
set udg_NewHeroPoint = GetUnitLoc(GetTriggerUnit())
set udg_NewHeroFacing = GetUnitFacing(GetTriggerUnit())
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_SavedItems[GetForLoopIndexA()] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA()))
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_Upgrade_1_Copy_Func007001() ) then
set udg_NewHeroType = 'UC42'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func008001() ) then
set udg_NewHeroType = 'EC44'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func009001() ) then
set udg_NewHeroType = 'Emoo'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func010001() ) then
set udg_NewHeroType = 'UC48'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func011001() ) then
set udg_NewHeroType = 'EC50'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func012001() ) then
set udg_NewHeroType = 'Ofar'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func013001() ) then
set udg_NewHeroType = 'OC54'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func014001() ) then
set udg_NewHeroType = 'Obla'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func015001() ) then
set udg_NewHeroType = 'OC58'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func016001() ) then
set udg_NewHeroType = 'EC61'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func017001() ) then
set udg_NewHeroType = 'HC63'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func018001() ) then
set udg_NewHeroType = 'HC65'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func019001() ) then
set udg_NewHeroType = 'HC67'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func020001() ) then
set udg_NewHeroType = 'HC69'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func021001() ) then
set udg_NewHeroType = 'HC71'
else
call DoNothing( )
endif
if ( Trig_Upgrade_1_Copy_Func022001() ) then
return
else
call DoNothing( )
endif
call RemoveUnit( GetTriggerUnit() )
call CreateNUnitsAtLoc( 1, udg_NewHeroType, udg_NewHeroPlayer, udg_NewHeroPoint, udg_NewHeroFacing )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "holdposition" )
call CreateItemLoc( 'IC78', GetUnitLoc(GetLastCreatedUnit()) )
call UnitAddItemSwapped( GetLastCreatedItem(), GetLastCreatedUnit() )
call SetPlayerHandicapXPBJ( udg_NewHeroPlayer, 125.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Upgrade_1_Copy_Func029003001() ) then
call UnitAddItemByIdSwapped( udg_SavedItems[GetForLoopIndexA()], GetLastCreatedUnit() )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call AddSpecialEffectLocBJ( GetUnitLoc(GetLastCreatedUnit()), "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
call AddSpecialEffectLocBJ( GetUnitLoc(GetLastCreatedUnit()), "Abilities\\Spells\\Other\\Levelup\\Levelupcaster.mdl" )
endfunction
//===========================================================================
function InitTrig_Upgrade_1_Copy takes nothing returns nothing
set gg_trg_Upgrade_1_Copy = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Upgrade_1_Copy, Player(0), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Upgrade_1_Copy, Player(1), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Upgrade_1_Copy, Player(2), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Upgrade_1_Copy, Player(6), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Upgrade_1_Copy, Player(7), EVENT_PLAYER_HERO_LEVEL )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Upgrade_1_Copy, Player(8), EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_Upgrade_1_Copy, Condition( function Trig_Upgrade_1_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Upgrade_1_Copy, function Trig_Upgrade_1_Copy_Actions )
endfunction