Jump to content

Start quest when another quest starts?


fireundubh

Recommended Posts

How do you start a quest when another quest starts?

 

For example, I want to add an item to the player when the player leaves Vault 111 and starts the game proper—and only then.

 

In Skyrim, I'd want to add an item to the player when the player leaves the cave at Helgen for the first time.

 

Currently, I have a quest that adds an item to the player immediately without any quest awareness.

Link to comment
Share on other sites

Cheap way to do it without editing the quest itself :

 

 - Add a spell to the player at the beginning (via OnInit on a playeralias for instance), spell with a scripted magic effect.

 - In the conditions for this magic effect (in the spell form, not the magic effect form), you set a GetStage or GetQuestRunning condition.

 - In the magic effect's script, into the OnMagicEffectStart event, you do whatever you want to do, so it can be aQuestProperty.Start()

 

 

With a bit of maintenance inside the OnPlayerLoadGame event, you can remove the spell once it have been added once (and thus the magic effect applied and your script processed / quest started), for a super-very-minor performance improvement.

Link to comment
Share on other sites

This was my solution:

ScriptName dubhAutoLootQuestScript Extends Quest

Quest Property MQ102 Auto
Form Property dubhAutoLootHolotape Auto

Event OnQuestInit()
	While MQ102.IsStageDone(6) == False
		; waiting until the Pip-Boy sequence finishes
	EndWhile
	Self.Stop()
EndEvent

Event OnQuestShutdown()
	Game.GetPlayer().AddItem(dubhAutoLootHolotape, 1, False)
EndEvent

Basically, that while loop will do nothing and iterate until MQ102's quest stage 6 is done. When that happens, the quest stops and an item is added to the player then.

 

Note: CompleteQuest() does not Stop() the quest.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...