4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

41 lines
1.0 KiB

Scriptname _00E_FS_Dismantle_Workbench extends ObjectReference
{lets the player melt down items to one of its base components, extends the crafting classes}
Actor Property PlayerREF Auto
ObjectReference Property _00E_RemoveAllItems_TrashContainer Auto
Event OnInit()
BlockActivation()
EndEvent
Event OnActivate(ObjectReference akActionRef)
Weapon rightHand = PlayerREF.GetEquippedWeapon(false)
Weapon leftHand = PlayerREF.GetEquippedWeapon(true)
if rightHand || leftHand
_00E_RemoveAllItems_TrashContainer.RemoveAllItems()
if rightHand == leftHand
_00E_RemoveAllItems_TrashContainer.AddItem(rightHand, 2, true)
else
if rightHand
_00E_RemoveAllItems_TrashContainer.AddItem(rightHand, 1, true)
endif
if leftHand
_00E_RemoveAllItems_TrashContainer.AddItem(leftHand, 1, true)
endif
endif
endif
Game.EnablePlayerControls()
Activate(PlayerREF, true)
if rightHand || leftHand
while ! Game.IsLookingControlsEnabled()
Utility.Wait(0.5)
endwhile
_00E_RemoveAllItems_TrashContainer.RemoveAllItems()
endif
Endevent