Is there any way to set a weapon through a dialogue option that then when another dialogue option is selected returns the weapon to you and equips it automatically?
What I've tried doing is using the following script for the add option where "PersonalWeaponList" is an initially empty leveled list:
"PersonalWeaponList.AddForm(Game.GetPlayer().GetEquippedWeapon(), 1, 1)
Game.GetPlayer().RemoveItem(Game.GetPlayer().GetEquippedWeapon())
HasWeapon.SetValue(1)"
And the following script for the return option:
"Game.GetPlayer().AddItem(PersonalWeaponList)
Game.GetPlayer().EquipItem(PersonalWeaponList)
HasWeapon.SetValue(0)"
I also tried stuff like the following:
"Form PlayerWeapF = PersonalWeaponList as Form
ObjectReference PlayerWeap = PlayerWeapF as ObjectReference
Game.GetPlayer().EquipItem(PlayerWeap)
HasWeapon.SetValue(0)"
However when I try to get the weapon the game doesn't actually give me the weapon and just sends the "was equipped" message with nothing in front of it in the first script and does nothing in the second.
Anyone know how to do this?