hi, this is my first post in this forum ...
is this a right way to make a streak ?
sry i forgot privates b4 functions
is this a right way to make a streak ?
JASS:
scope x initializer InitTrig_Kill_system
globals
private integer array x
private integer id = GetPlayerId(GetOwningPlayer(GetKillingUnit()))
endglobals
function Kill_system_Conditions takes nothing returns boolean
return IsUnitType(GetTriggerUnit() , UNIT_TYPE_HERO)
endfunction
function Kill_system_Actions takes nothing returns nothing
set x[id] = x[id] + 1
if x[id]==3 then
call StartSound( gg_snd_Killing_Spree )
elseif x[id]==4 then
call StartSound( gg_snd_Dominating )
elseif x[id]==5 then
call StartSound( gg_snd_MegaKill )
elseif x[id]==6 then
call StartSound( gg_snd_Unstoppable )
elseif x[id]==7 then
call StartSound( gg_snd_WhickedSick )
elseif x[id]==8 then
call StartSound( gg_snd_MonsterKill )
elseif x[id]==9 then
call StartSound( gg_snd_GodLike )
elseif x[id]>9then
call StartSound( gg_snd_HolyShit )
endif
endfunction
//===========================================================================
function InitTrig_Kill_system takes nothing returns nothing
local trigger Kill_system = CreateTrigger( )
set x[id] = 0
call TriggerAddAction( Kill_system, function Kill_system_Actions )
call TriggerAddCondition( Kill_system, Condition (function Kill_system_Conditions) )
call TriggerRegisterAnyUnitEventBJ( Kill_system, EVENT_PLAYER_UNIT_DEATH)
endfunction
endscope
sry i forgot privates b4 functions