No. I should make a new trigger
-Event- a unit dies
-Condition - trigger unit is a hero = true
-Actions - custom script call amsTS_IncreaseScore(Triggering unit, Death, +1)
call amsTS_IncreaseScore(Killing unit, Kill, +1)
Something like this?
Argh, it returned me a syntax error =/
-Event- a unit dies
-Condition - trigger unit is a hero = true
-Actions - custom script call amsTS_IncreaseScore(Triggering unit, Death, +1)
call amsTS_IncreaseScore(Killing unit, Kill, +1)
Something like this?
JASS:
function Trig_Player_Number_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Player_Number_Actions takes nothing returns nothing
call amsTS_IncreaseScore(( GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) - 1 ) ,TAG[1],+1)))
endfunction
function Trig_Player_Number_Actions takes nothing returns nothing
call amsTS_IncreaseScore(( GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ())) - 1 ),TAG[0],+1)))
endfunction
//===========================================================================
function InitTrig_Player_Number takes nothing returns nothing
set gg_trg_Player_Number = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Player_Number, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Player_Number, Condition( function Trig_Player_Number_Conditions ) )
call TriggerAddAction( gg_trg_Player_Number, function Trig_Player_Number_Actions )
endfunction
Argh, it returned me a syntax error =/