| 05-31-2006, 12:42 PM | #1 |
please, help me, i use these triggers : function Trig_Reagents_Respawn_Func001C takes nothing returns boolean if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00I' ) ) then return false endif return true endfunction function Trig_Reagents_Respawn_Func002C takes nothing returns boolean if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00H' ) ) then return false endif return true endfunction function Trig_Reagents_Respawn_Actions takes nothing returns nothing local location loc_item local location loc_item2 if ( Trig_Reagents_Respawn_Func001C() ) then set loc_item = GetItemLoc(GetManipulatedItem()) call PolledWait( 5.00 ) call CreateItemLoc( GetItemTypeId(GetManipulatedItem()), loc_item ) call RemoveLocation(loc_item) set loc_item = null else call DoNothing( ) endif if ( Trig_Reagents_Respawn_Func002C() ) then set loc_item2 = GetItemLoc(GetManipulatedItem()) call PolledWait( 5.00 ) call CreateItemLoc( GetItemTypeId(GetManipulatedItem()), loc_item2 ) call RemoveLocation(loc_item2) set loc_item2 = null else call DoNothing( ) endif endfunction //=========================================================================== function InitTrig_Reagents_Respawn takes nothing returns nothing set gg_trg_Reagents_Respawn = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Reagents_Respawn, EVENT_PLAYER_UNIT_PICKUP_ITEM ) call TriggerAddAction( gg_trg_Reagents_Respawn, function Trig_Reagents_Respawn_Actions ) endfunction they're supposted to respawn reagents in my map, but items wont appear again if i remove them from hero inventory with trigger (after i pick up them) and they will respawn again in more places if i drop them. How to fix that ? please,help .thx. |
