Thuggysmurf Posted May 8, 2018 Share Posted May 8, 2018 This should be really basic but I haven't run into it before in FO4: NPC gives player a quest to retrieve an item from a container. The item to retrieve pulls from a leveled list of 15 items. There is a quest reference alias called "Loot" that points to this leveled list. Player retrieves loot item and talks to NPC to get reward. At this point the item retrieved should be removed from player inventory. But the script isn't compiling. Steps taken so far: 1) In the quest stages tab, end stage, under papyrus fragments, created a property for the reference alias, called Loot. CK automatically pointed this to the correct alias. 2) Added the following script language to that quest stage:Game.GetPlayer().RemoveItem(Alias_Loot.GetRef(), 1) The following errors come up when compiling:- variable Alias_Loot is undefined- none is not a known user-defined script type- type mismatch on parameter 1 - cannot pass a void to a form Triple checked: Loot is defined as a reference alias property. I don't understand, because this method worked just fine in Skyrim Creation Kit, and I'm following the template for the vanilla Quartermastery quest BoSR02 (retrieve tech for Brotherhood of Steel) No luck with this either:Game.GetPlayer().RemoveItem(Alias_Loot.GetReference(), 1) Using:Game.GetPlayer().RemoveItem(LootItem)where "LootItem" is a LeveledItem property pointed at the leveled list, compiles, but then it doesn't remove the correct item from player's inventory in game. Appreciate any suggestions. Thanks! Link to comment Share on other sites More sharing options...
werr92 Posted May 8, 2018 Share Posted May 8, 2018 If your ReferenceAlias property is called 'Loot', you should address it asGame.GetPlayer().RemoveItem(Loot.GetRef(), 1)And notGame.GetPlayer().RemoveItem(Alias_Loot.GetRef(), 1)That Alias_ prefix means nothing (it just makes another name). As of now, I can't remember if calling 'Alias_AliasName' was a thing in Skyrim, but here it is not, that's for sure. Link to comment Share on other sites More sharing options...
Thuggysmurf Posted May 8, 2018 Author Share Posted May 8, 2018 Works now, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts