icecreamassassin Posted November 11, 2016 Share Posted November 11, 2016 So I have an alias which fills with a random reference to a base item on a formlist. I can start up the quest and initiate dialog and trigger the stage which marks the alias, can pick up the item marked and progress the quest just fine. I cannot however remove the item with dialog script fragments. The issue I think is that my dialog for the turn in is on another quest. I have however set the other quest up in the property so I SHOULD be able to pull the alias from the other quest and cast it as an object that can be removed from my inventory with the Removeitem function right? This is what I have and it keeps telling me I can't cast an alias to an objectreference, but I've used the removeitem(alias) function a multitude of time, just never from another quest. Note that ArtifactREF1 is an alias property that is filled from the appropriate quest. I have also tried to simply do: Removeitem(OtherQST.Alias_ArtifactREF1.GetReference() as ObjectReference) Game.GetPlayer().RemoveItem(Alias_ArtifactREF1 as ObjectReference) Int Random = Utility.RandomInt(300, 750) Game.GetPlayer().AddItem(Gold001, random) DBM_RelicsFound.value += 1 DBM_MuseumJoinQST.SetStage(10) Any idea what I'm doing wrong here? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 11, 2016 Share Posted November 11, 2016 You are trying to cast an Alias into an ObjectReference? Try using GetReference() instead. Link to comment Share on other sites More sharing options...
icecreamassassin Posted November 11, 2016 Author Share Posted November 11, 2016 Yeah I did that and it keeps telling me that Alias_ArrtifactREF1 is not a property on script quest Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 11, 2016 Share Posted November 11, 2016 Can you use a FormList of the base items used on the aliases of the other quest? Walk the list and take the first item the player has (assuming that each item is unique). Link to comment Share on other sites More sharing options...
icecreamassassin Posted November 11, 2016 Author Share Posted November 11, 2016 Yeah I think I ran into something like this before and my way around it was to run the alias removal function in the quest stage rather than the dialog fragment and it seems to work fine now. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts