Jump to content

Hmm, I can't figure HOW to script this.


JcHARP

Recommended Posts

Okay, so I am trying to make it so that after 24 hours in game my quest progresses to the next stage.

;BEGIN FRAGMENT Fragment_4
Function Fragment_4()
;BEGIN CODE
SetObjectiveCompleted(10)
SetObjectiveDisplayed(15)
RegisterForSingleUpdateGameTime(24.0)
;END CODE
EndFunction
;END FRAGMENT

Event OnUpdateGameTime()
	If JPCQ01.GetStageDone(10)
		JPCQ01.SetStage(20)
	EndIf
EndEvent

Still doesn't seem to work :O What could I possibly be doing wrong?

Link to comment
Share on other sites

I've already found a great way of doing it. Theorycrafted some stuffs up and came up with:

Quest Property JPCQ01 Auto

State JPCQ01Active
	Event OnBeginState()
		If JPCQ01.GetStage() == 15
			RegisterForSingleUpdateGameTime(6.0)
		EndIf
	EndEvent

	Event OnUpdateGameTime() ;When six hours in-game time passes it's time to GUNGNAMSTYLE!
			JPCQ01.SetStage(20)
			UnregisterForUpdateGameTime()
			GoToState("JPCQ01Active2")
	EndEvent
EndState

State JPCQ01Active2 ;This is the final state in the script meaning that if we leave it blank it SHOULD be ignored!

	Event OnEndState()
			Debug.Trace("Leaving the state blank!") ;A trace to prove myself right!
	EndEvent
EndState

Under Stage(15) I put in Papyrus Script GoToState("JPCQ01Active"). It works like a charm now!

 

I will check out that link too, more ways of doing something is good to know, thanks :D

Link to comment
Share on other sites

  • Recently Browsing   0 members

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