IETS - v0.5.1
    Preparing search index...

    Function UseItem

    BG2 barrel re-exports.

    Generated by ts-update. Do not edit manually.

    Uses named re-exports (not export *) so esbuild can statically resolve each binding without falling back to runtime __reExport helpers for externalized .d.ts modules.

    • This action instructs the active creature to use the specified item (object) on the specified target (target). The ability number (i.e. extended header index) to use may be specified. This action is most often used to allow use of potions and wands. The item to be used must exist in the active creature's inventory (not in a container within the inventory) - though it need not be equipped.

       IF
         HPPercentLT(Myself,50)
         HasItem("potn52",Myself)
       THEN
         RESPONSE #100
           DisplayStringHead(Myself,46150) //quaffs a potion
           UseItem("potn52",Myself)
           Continue()
       END
      

      IWDEE supports also the UseItemAbility signature:

       IF
         !StateCheck(Myself,STATE_MIRRORIMAGE)
         GlobalLT("MO_UsedIlbratha","GLOBAL",1)
         HasItemEquiped("SW1H26",Myself)  // Ilbratha +1
       THEN
         RESPONSE #100
           SetInterrupt(FALSE)
           UseItemAbility("SW1H26",Myself,SLOT_AMMO3,1)  // Ilbratha +1
           SetInterrupt(TRUE)
           IncrementGlobal("MO_UsedIlbratha","GLOBAL",1)
       END
      

      Parameters

      Returns Action