- Joined
- May 4, 2007
- Messages
- 2,260
Hi guys, i am trying to create an item system. It is nearly like dota.
When a hero buys 2 equal items, they merge into 1 item.
I already read all your item tutorials but i was unable to find the answr i was looking for ... can you guys please help me ???
As you can see i have an idea about what i am supposed to do ... however i don't know which actions i have to call !!!!
please help =S
When a hero buys 2 equal items, they merge into 1 item.
I already read all your item tutorials but i was unable to find the answr i was looking for ... can you guys please help me ???
JASS:
function Combination_Conds takes nothing returns boolean
return GetItemTypeId(GetManipulatedItem()) == 'I00A'
endfunction
//====================================================
function Combination_Acts takes nothing returns nothing
local item i = GetManipulatedItem()
local integer item_Amount = 2
local integer itemSlots= 0
loop
exitwhen itemSlots == 6
//Which action do i do here ???? Confused =s
endloop
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
local trigger Combination = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( Combination, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( Combination, Condition( function Combination_Conds ) )
call TriggerAddAction( Combination, function Combination_Acts )
set Combination = null
endfunction
As you can see i have an idea about what i am supposed to do ... however i don't know which actions i have to call !!!!
please help =S