zprospero, on Nov 17 2009, 09:31 PM, said:
Well, you'll need to use a script attached to the staff with an ondrop block, like this.
Begin ondrop
End
How you want to get rid of the staff from the world is up to you, but removeitem won't
work because it's not in the player's inventory.
If you're wanting it to be unsummoned due to sheathing (like other bound weapons) you'd need to use a
gamemode block instead. This can be a bit tricky, but something like;
short toggle
begin gamemode
if player.getequipped <staffID> == 1
if player.isweaponout == 1 && toggle == 0
set toggle to 1
elseif player.isweaponout != 1 && toggle == 1
set toggle to 0
player.unequipitem <staffID> 1
endif
endif
begin onunequip
player.removeitem <staffID> 1
player.dispel <spell ID of summon spell>
endif
Attached to the item.
Making the item flagged as a quest item will prevent the player from being able to drop it, and thus removing the necessity of adding scripting in an ondrop block, setting up a dummy actor to pick up the item, ect. The purpose of the variable is so that the weapon isn't immediately unsummoned if the player didn't have their weapon out upon summoning. This should make it so that the player can keep the weapon sheathed without it being instantly removed, but unable to re-sheath it once it has been unsheathed without the item being removed.
There are a few notes under
http://cs.elderscrol...x.php/EquipItem that you might find interesting.