sunshinex3
You can change this now in User CP.
- Reaction score
- 7
call UnitMakeAbilityPermanent(unit, true, ability)
// i need to make abilities given permanent; were do i place the line above into the trigger below?
function Trig_unit_bonuses_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetKillingUnitBJ(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
return true
endfunction
function Trig_unit_bonuses_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0Z2', GetKillingUnitBJ()) <= 100 ) ) then
return false
endif
return true
endfunction
function Trig_unit_bonuses_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0Z2', GetKillingUnitBJ()) < 1 ) ) then
return false
endif
return true
endfunction
function Trig_unit_bonuses_Actions takes nothing returns nothing
if ( Trig_unit_bonuses_Func001C() ) then
call UnitAddAbilityBJ( 'A0Z2', GetKillingUnitBJ() )
call UnitAddAbilityBJ( 'A0Z3', GetKillingUnitBJ() )
call UnitAddAbilityBJ( 'A0Z5', GetKillingUnitBJ() )
else
if ( Trig_unit_bonuses_Func001Func001C() ) then
call IncUnitAbilityLevelSwapped( 'A0Z2', GetKillingUnitBJ() )
call IncUnitAbilityLevelSwapped( 'A0Z3', GetKillingUnitBJ() )
call IncUnitAbilityLevelSwapped( 'A0Z5', GetKillingUnitBJ() )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_unit_bonuses takes nothing returns nothing
set gg_trg_unit_bonuses = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_unit_bonuses, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_unit_bonuses, Condition( function Trig_unit_bonuses_Conditions ) )
call TriggerAddAction( gg_trg_unit_bonuses, function Trig_unit_bonuses_Actions )
endfunction
// this is the trigger above, where do i place the line?; call UnitMakeAbilityPermanent(unit, true, ability)
// i need to make abilities given permanent; were do i place the line above into the trigger below?
function Trig_unit_bonuses_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetKillingUnitBJ(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
return true
endfunction
function Trig_unit_bonuses_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0Z2', GetKillingUnitBJ()) <= 100 ) ) then
return false
endif
return true
endfunction
function Trig_unit_bonuses_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0Z2', GetKillingUnitBJ()) < 1 ) ) then
return false
endif
return true
endfunction
function Trig_unit_bonuses_Actions takes nothing returns nothing
if ( Trig_unit_bonuses_Func001C() ) then
call UnitAddAbilityBJ( 'A0Z2', GetKillingUnitBJ() )
call UnitAddAbilityBJ( 'A0Z3', GetKillingUnitBJ() )
call UnitAddAbilityBJ( 'A0Z5', GetKillingUnitBJ() )
else
if ( Trig_unit_bonuses_Func001Func001C() ) then
call IncUnitAbilityLevelSwapped( 'A0Z2', GetKillingUnitBJ() )
call IncUnitAbilityLevelSwapped( 'A0Z3', GetKillingUnitBJ() )
call IncUnitAbilityLevelSwapped( 'A0Z5', GetKillingUnitBJ() )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_unit_bonuses takes nothing returns nothing
set gg_trg_unit_bonuses = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_unit_bonuses, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_unit_bonuses, Condition( function Trig_unit_bonuses_Conditions ) )
call TriggerAddAction( gg_trg_unit_bonuses, function Trig_unit_bonuses_Actions )
endfunction
// this is the trigger above, where do i place the line?; call UnitMakeAbilityPermanent(unit, true, ability)