azzendix Posted December 22, 2016 Share Posted December 22, 2016 (edited) SOLVED. https://forums.nexusmods.com/index.php?/topic/5192020-cant-add-quest-item-to-player-inventory/ I'm very beginner to scripting. Hope someone can help me. Problem: The player can drop ring from my mod even I assign it as quest object already. How to make this ring undroppable? What am I doing wrong? Detail: I create a script to show message box every 20 mins and use the ring to toggle notification.(equip to show the message box. unequip to hide message box.) I add the ring to quest alias with type "Create Reference to Object," "Create In" Player. Screenshot1 / Screenshot2. I use this command give ring to the player automatically when running this script for the first time. PlayerRef.Additem(TakeCareRing, 1, True) Edited December 23, 2016 by azzendix Link to comment Share on other sites More sharing options...
azzendix Posted December 22, 2016 Author Share Posted December 22, 2016 Just in case someone wants to see full script.This is the quest script. Scriptname _TakeCare_Main extends Quest {This is main script. Display messages every 20 minutes.} Actor Property PlayerRef Auto Armor Property TakeCareRing Auto Message Property _TakeCare_Msg Auto GlobalVariable Property _TakeCare_Time Auto Int Property Status = 0 Auto Event OnInit() Debug.Notification("Take Care of Your Eyes has been activated.") PlayerRef.Additem(TakeCareRing, 1, True) RegisterForSingleUpdate(_TakeCare_Time.GetValue()) endEvent Event OnUpdate() if (Status == 1) _TakeCare_Msg.Show() endIf RegisterForSingleUpdate(_TakeCare_Time.GetValue()) endEvent This is the ring script.(attach to the ring object in armor section.) Scriptname _TakeCare_Ring extends ObjectReference {Equip/Unequip to show/hide message box.} Actor Property PlayerRef Auto _TakeCare_Main Property _TakeCare_Main_Property Auto Event OnEquipped(Actor akActor) if akActor == PlayerRef Debug.Notification("Show message box.") _TakeCare_Main_Property.Status = 1 endIf endEvent Event OnUnequipped(Actor akActor) if akActor == PlayerRef Debug.Notification("Hide message box.") _TakeCare_Main_Property.Status = 0 endIf endEvent Link to comment Share on other sites More sharing options...
zilav Posted December 22, 2016 Share Posted December 22, 2016 Since you already flagged it as "Quest Object" but player can drop it anyway, this means that alias is not getting filled or the whole quest is not running. Link to comment Share on other sites More sharing options...
azzendix Posted December 22, 2016 Author Share Posted December 22, 2016 (edited) the whole quest is not running.I tested the mod with my game. I think both script quests are running because I can see message "Take Care of Your Eyes has been activated." at first and "Show message box." "Hide message box." when equip/unequip ring. The message box stop shows up after unequip ring. The script is working as intended. alias is not getting filledNot sure I understand about "filled". Do you mean the value of the property?Please check these images. Edited December 22, 2016 by azzendix Link to comment Share on other sites More sharing options...
azzendix Posted December 22, 2016 Author Share Posted December 22, 2016 (edited) . Edited December 22, 2016 by azzendix Link to comment Share on other sites More sharing options...
agerweb Posted December 24, 2016 Share Posted December 24, 2016 You're player Alias for player must be first in the list otherwise the create in player Alias will not fill. Link to comment Share on other sites More sharing options...
Recommended Posts