Jump to content

How to remove Quest Object status on Quest Aliases


Bluarchon

Recommended Posts

Hi,

 

I'm creating a quest mod which allows the character to keep a journal in his inventory which is used throughout the quest. The thing is, I do not want the player to lose the journal so I made a Quest Alias to reference it and made it a Quest Object so they cannot get rid of it. The thing is, once the quest is done, will they be able to get rid of the journal? I wanted to give the players an option to get rid of the journal once it has served its purpose after the quest. Is this possible through scripting? Any kind of help is appreciated.

Link to comment
Share on other sites

Ending the quest (not merely setting it completed, but actually stopping it) should remove that quest item status.

 

Another option would be to use a script on the item itself that uses the OnContainerChanged() event to put itself right back into the player's inventory should it be removed, unless the quest as progressed past a certain stage. Then you don't have to make the alias a quest object.

 

Yet another option (that's maybe a bit of a cheat) is, when the quest is done, use a script to remove the quest alias from the player, but then immediately add another copy of the item to the player's inventory. Something like this:

 

Player.RemoveItem(Alias_Journal, 1, True) ;Remove it, but suppress any message
Player.AddItem(Alias_Journale.GetBaseItem(), 1, True) ;Add a non-quest duplicate, also silently

 

And yet one more option (maybe) would be to use Clear() on the alias, which if I understand correctly leaves the item where it is but the alias no longer points to it (have to make sure the alias is optional for this to work).

Link to comment
Share on other sites

Thanks kromey. I've tried the OnLocationChange event but had troubles triggering with my custom locations. I'm using OnCellAttach() now. The problem is that the area of a cell is too big and general to determine if the player is in the exact spot you want him to be.

Edited by Bluarchon
Link to comment
Share on other sites

I'm not sure how this works. If I attach a ReferenceAlias to a rock in the worldspace and use an OnTriggerEnter event, when will the event trigger? When you get near the rock? The description on the CK site doesn't really make sense to me.

 

Also I appreciate you staying with me all this time to help with scripting. I'm thinking of releasing my mod within the week. If you don't mind, I will mention your help on the credits.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...