| 09-01-2004, 07:36 PM | #1 |
function Trig_GruntWeapons_Func003C takes nothing returns boolean if ( ( S2I(SubStringBJ(R2S(GetItemLifeBJ(GetManipulatedItem())), 4, 6)) < 10 ) ) then return true endif if ( ( S2I(SubStringBJ(R2S(GetItemLifeBJ(GetManipulatedItem())), 4, 6)) > 18 ) ) then return true endif return false endfunction function Trig_GruntWeapons_Conditions takes nothing returns boolean if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_PERMANENT ) ) then return false endif if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'H004' ) ) then return false endif if ( not Trig_GruntWeapons_Func003C() ) then return false endif return true endfunction function Trig_GruntWeapons_Actions takes nothing returns nothing call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() ) call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 15.00, "TRIGSTR_1108" ) endfunction //=========================================================================== function InitTrig_GruntWeapons takes nothing returns nothing set gg_trg_GruntWeapons = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_GruntWeapons, EVENT_PLAYER_UNIT_PICKUP_ITEM ) call TriggerAddCondition( gg_trg_GruntWeapons, Condition( function Trig_GruntWeapons_Conditions ) ) call TriggerAddAction( gg_trg_GruntWeapons, function Trig_GruntWeapons_Actions ) endfunction |
| 09-02-2004, 02:27 AM | #2 |
If you tell me what it does in english I might be able to help you. |
| 09-02-2004, 06:53 PM | #3 |
I made a new trigger. Thnx anyway though! I*.*I |
