![]() |
@UnEquip - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: @UnEquip (/Thread-UnEquip) |
@UnEquip - Art - 04-30-2013 09:19 AM Hello. I have function on UnEquip trigger which checking character's layers, but problem is that trigger works when item still on layer. I should check layers instantly after item was unequipped. RE: @UnEquip - Mordaunt - 04-30-2013 10:56 AM It has to fire right before the unequip because return 1 will prevent the unequip so do this instead Code: on=@UNEQUIP RE: @UnEquip - Art - 04-30-2013 04:02 PM Yes i understand, but i thought there maybe exist trigger which works after item was unequipped ![]() But is there another way without timerf? It have delay, and also if player will equip and unequip item many times per second (specially on macros or script), will be stack for those functions overflowed? Or some load on server? RE: @UnEquip - RanXerox - 04-30-2013 04:08 PM What are you trying to do? RE: @UnEquip - Art - 04-30-2013 07:42 PM I have tags on armors, and when player equip those armors, function recalculates extra bonus for character in dependence of tags on equipped items. Function checks items through character's layers, so, when player unequip item, at function process item still on layer, heh. RE: @UnEquip - Gil Amarth - 04-30-2013 07:54 PM Try: on=@UNEQUIP timerf 0, f_myfunction I´m not 100% sure, but from my experience with timerf 0, the script launches just when the trigger has finished what was doing. I also use a system of armors and clothing with this, and I haven´t problems with macros. RE: @UnEquip - RanXerox - 05-01-2013 01:25 AM I don't see what the problem is.. I do the same thing using normal functions in @equip and @unequip ... for example: Here are the items: Code: [ITEMDEF i_cap_work] And here are the functions: Code: [FUNCTION WorkClothesEquip] |