| 07-02-2007, 11:52 PM | #1 |
This function JASS:function InvRemoveItem takes unit u, item i returns nothing call UnitRemoveItem(u, i) endfunction Executes this trigger (I'm only showing the conditions cause that's all that matters) JASS:function antidragconditions takes nothing returns boolean local integer i = GetIssuedOrderId() local item target = GetOrderTargetItem() if i > 852001 and i < 852008 and IsUnitInGroup(GetOrderedUnit(), udg_unitswinventory) and GetOrderTargetItem() != UnitItemInSlot(GetOrderedUnit(), i-852002) then if GetItemTypeId(target) == 'I02P' or GetItemTypeId(target) == 'I02Q' or GetItemTypeId(target) == 'I02R' then set target = null return true endif endif set target = null return false endfunction function BInv takes nothing returns nothing local trigger antidrag = CreateTrigger() call TriggerRegisterAnyUnitEventBJ(antidrag, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER) call TriggerAddAction(antidrag, function antidragactions) call TriggerAddCondition(antidrag, Condition(function antidragconditions)) set antidrag = null endfunction Am I missing something? Does UnitRemoveItem(u, i) give the unit some order I'm not aware of? Help me out here... |
| 07-02-2007, 11:56 PM | #2 |
add a message to display the id of issued order? |
| 07-03-2007, 12:00 AM | #3 |
ill try it and see what comes up |
| 07-03-2007, 12:39 AM | #4 |
This line right after the 'UnitRemoveItem' displays 0 JASS:call DisplayTextToPlayer(0, 0, 0, I2S(GetIssuedOrderId())) So does JASS:call DisplayTextToPlayer(Player(0),0,0,I2S(GetUnitCurrentOrder(u))) Guessing cause they're both event responses and this (obviously) isn't a trigger. Has anyone had this issue before? |
