làm thế nào để kill hero đc tiền hả bác
bạn có thể dùng hàm ì để chỉnh số tiền phù hợp cho từng hero
---------- Post added at 12:22 ---------- Previous post was at 12:19 ----------
function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
set udg_Unitgiet = GetKillingUnitBJ()
set udg_nguoichoi = GetOwningPlayer(udg_Unitgiet)
call AdjustPlayerStateBJ( 200, udg_nguoichoi, PLAYER_STATE_RESOURCE_GOLD )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Untitled_Trigger_001, Condition( function Trig_Untitled_Trigger_001_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
---------- Post added at 12:28 ---------- Previous post was at 12:22 ----------
bằng String:-Even:A Unit Dies
-Conditons

Stringering Unit) is A Hero) Equal to True
-Actions: Set unit = (killing unit)
Set nguoi_choi= (Owner of unit)
Player-Add 200 to nguoi_choi Current Gold
---------- Post added at 12:30 ---------- Previous post was at 12:28 ----------
bằng String:-Even:A Unit Dies
-Conditons

Stringering Unit) is A Hero) Equal to True
-Actions: Set unit = (killing unit)
Set nguoi_choi= (Owner of unit)
Player-Add 200 to nguoi_choi Current Gold
tớ mới tập Pót thông cảm
