Jump to content

[Template] Equip item to player, wait for SL end, unequip item


hextun

Recommended Posts

Posted (edited)
; change this to something other than $system.player (e.g. $system.partner) to target a different actor for some reason
set $target_actor $system.player

; if we are not in a scene, exit
sl_isin $target_actor
if $$ == false
  return
endif

; change these two values appropriately to the formid and armor slot of the item to add/equip/unequip/remove
set $item_to_equip "modfile.esp:0xDEADBEEF"
set $item_slot 32

; add and equip
item_addex $target_actor $item_to_equip 1 true
item_equipex $target_actor $item_to_equip $item_slot false false

; wait til done
util_waitforend $target_actor

; unequip and remove
item_unequipex $target_actor $item_to_equip $item_slot
item_remove $target_actor $item_to_equip 1 true

 

Edited by hextun
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...