Lexluckyluke Posted November 8, 2016 Author Share Posted November 8, 2016 (edited) If GetReference() is failing in a ReferenceAlias script then that means the alias isn't filled. Most likely it's because the quest isn't running. Functions that run inside the OnInit() event run even before the game itself has completely started even if the quest isn't running. If you're going to need to use GetReference() in OnInit() then you'll need to make the quest as Start Game Enabled. "Start Game Enabled" was Already checked in the quest Datathe message box pop when the game is loaded and not in the loading menu You mean that your call of "GetReference()" returns "none"?While I do not have the most experience with Papyrus, I don't really think that just calling that function without refering to any object/alias whatsoever would work.Looking at the example given on the wiki here: http://www.creationkit.com/fallout4/index.php?title=GetReference_-_ReferenceAlias ; Get the reference the alias points atObjectReference bossRef = BossAlias.GetReference() yeah after posting i continue my searches and i have found this page and i have edited my code like this : Formlist Property HCinventoryfilter Auto ReferenceAlias Property hardcoreinventoryalias Auto Event OnInit() Debug.MessageBox("player ref = " + hardcoreinventoryalias.GetReference() ) AddInventoryEventFilter(HCinventoryfilter) EndEvent Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) Debug.Notification("ply itemadded event = " + hardcoreinventoryalias.GetReference() ) Debug.Notification("ding ! ") endEvent also filled like this : http://img4.hostingpics.net/pics/925500yore.jpg but with all of this, game print again "player ref = none" and event are not triggered :/ Edited November 8, 2016 by Lexluckyluke Link to comment Share on other sites More sharing options...
cdcooley Posted November 8, 2016 Share Posted November 8, 2016 There's no reason (and it's inefficient) to have a property on that alias pointing back to itself. Just a plain "GetReference()" call should be returning the player. If it isn't then the alias isn't filled. You can try stopping and restarting the quest (unless you made it a run-once quest). It's always best to do your testing in a fresh game. If you're modifying this script and quest and reloading a game that already had a previous version then that could be the problem. Link to comment Share on other sites More sharing options...
Lexluckyluke Posted November 9, 2016 Author Share Posted November 9, 2016 (edited) There's no reason (and it's inefficient) to have a property on that alias pointing back to itself. Just a plain "GetReference()" call should be returning the player. If it isn't then the alias isn't filled. You can try stopping and restarting the quest (unless you made it a run-once quest). It's always best to do your testing in a fresh game. If you're modifying this script and quest and reloading a game that already had a previous version then that could be the problem.OHMYGOD you have the true response, it was my save, i have try my mod into a fresh started game and , this is working(i have also deleted the referencalias property in my script) oh my god i spend one entire week to try to understand what is the problem .... finnalymuch thanks ! i need to understand why my save isn't working and a new game is good ... PS: can you tell me how to mark the topic as solved ? Edited November 9, 2016 by Lexluckyluke Link to comment Share on other sites More sharing options...
cdcooley Posted November 10, 2016 Share Posted November 10, 2016 Save game files are just a special type of mod that copies parts of your other mods to store changes. When you save a game with a mod loaded then change the original many times the version of things stored in the saved game file override some or all of the changes you made. It's especially annoying when you're in the early stages of developing a mod and making lots of changes as you've just found. When we stop replying to this it will just naturally drop away so you don't need to worry about doing anything special. Anyone silly enough to read the question and not keep reading to see if it was answered deserves to waste their time writing a response. Link to comment Share on other sites More sharing options...
Recommended Posts