Jump to content

Timer Script, need help


Wyrm1331

Recommended Posts

Get rid of the doonce, and try this (assuming your topic IDs are correct):

 

 

scn 01Quest

Short StartDay
Short FinishDay
Short state

Begin GameMode

   	If ( GetStage aa1 == 6 )
           	If state == 0
                   	Set StartDay to GameDaysPassed
                   	Set state to 1
                   	Set FinishDay to ( StartDay +3 )
                   	AddTopic 1
           	ElseIf  state == 1
                   	If GameDaysPassed > ( StartDay +3 )
                           	Setstage aa1 7
                           	AddTopic 2
                           	set state to 2
                   	EndIf
           	EndIf
   	Endif

End

 

 

The previous script worked, although I admit yours looks cleaner (except for the now redundant FinishDay variable). The problem must be something else other than the script.

Link to comment
Share on other sites

Get rid of the doonce, and try this (assuming your topic IDs are correct):

 

 

scn 01Quest

Short StartDay
Short state

Begin GameMode

   	If ( GetStage aa1 == 6 )
           	If state == 0
                   	Set StartDay to GameDaysPassed
                   	Set state to 1
                   	AddTopic 1
           	ElseIf  state == 1
                   	If GameDaysPassed > ( StartDay +3 )
                           	Setstage aa1 7
                           	AddTopic 2
                           	set state to 2
                   	EndIf
           	EndIf
   	Endif

End

 

 

The previous script worked, although I admit yours looks cleaner (except for the now redundant FinishDay variable). The problem must be something else other than the script.

 

Then I'm confused. If the previous script worked, why are you still looking for a solution? If it doesn't pass to the next stage, clearly it doesn't work. Have you even tried mine?

 

(Redundant FinishDay removed from quote).

Link to comment
Share on other sites

Well I'm not the one trying to make the timer script. I only tried what Wrym1331 had so far and it worked for me. For some reason it didn't work for him. I have no idea why it doesn't. This is exactly what I did:

 

Opened up TESCS

Create a new quest with ID "aa1"

Set quest priority as 60

Set condition as GetIsPlayableRace == 1

Add stages 6 and 7 to the quest stages tab

Press ok and close the quest window

Choose to create a new script

Choose script type as quest

Pasted this as the script:

 

 

scn 01Quest

Short StartDay
Short state
short tempvar

Begin GameMode

set tempvar to GetStage aa1
Message "aa1 stage: %.0f" tempvar
If ( GetStage aa1 == 6 )
	If state == 0
		Set StartDay to GameDaysPassed
		Set state to 1
	ElseIf  state == 1
		If GameDaysPassed > ( StartDay +3 )
			Setstage aa1 7
			set state to 2
		EndIf
	EndIf
Endif

End

 

 

Compiled, saved, and closed the script window

Went back to the quest window and chose "01Quest" as the script for "aa1" quest

Saved the mod, opened up OBMM, checked the mod, launched the game

Opened up the command console and typed "SetStage aa1 6"

Kept checking the message on the screen after every 24 hours I slept

After the 4th day (because the script has "If GameDaysPassed > ( StartDay +3 )" and not "If GameDaysPassed >= ( StartDay +3 )") the message changed to "aa1 stage: 7"

Edited by fg109
Link to comment
Share on other sites

Well I'm not the one trying to make the timer script.

 

Ah, right. My oversight.

Link to comment
Share on other sites

Get rid of the doonce, and try this (assuming your topic IDs are correct):

 

 

scn 01Quest

Short StartDay
Short FinishDay
Short state

Begin GameMode

   	If ( GetStage aa1 == 6 )
           	If state == 0
                   	Set StartDay to GameDaysPassed
                   	Set state to 1
                   	Set FinishDay to ( StartDay +3 )
                   	AddTopic 1
           	ElseIf  state == 1
                   	If GameDaysPassed > ( StartDay +3 )
                           	Setstage aa1 7
                           	AddTopic 2
                           	set state to 2
                   	EndIf
           	EndIf
   	Endif

End

 

 

Hi!!

 

It finally works, i don´t know why reason it didn´t work before, but with that script, it works. Thanks for all!! :thumbsup:

Link to comment
Share on other sites

Get rid of the doonce, and try this (assuming your topic IDs are correct):

 

 

scn 01Quest

Short StartDay
Short FinishDay
Short state

Begin GameMode

   	If ( GetStage aa1 == 6 )
           	If state == 0
                   	Set StartDay to GameDaysPassed
                   	Set state to 1
                   	Set FinishDay to ( StartDay +3 )
                   	AddTopic 1
           	ElseIf  state == 1
                   	If GameDaysPassed > ( StartDay +3 )
                           	Setstage aa1 7
                           	AddTopic 2
                           	set state to 2
                   	EndIf
           	EndIf
   	Endif

End

 

 

Hi!!

 

It finally works, i don´t know why reason it didn´t work before, but with that script, it works. Thanks for all!! :thumbsup:

 

Cool. :thumbsup:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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