Jump to content

Timer Script, need help


Wyrm1331

Recommended Posts

Maybe you can try changing it to (StartDay + 3). I know that spacing matters in the if statements, so it probably matters for that too.

 

If that's not the problem, exactly what is happening when you try to use the script?

 

 

hey i can't help but notice that startday and finishday are in purple, which leads me to believe that they may be phrases the game has saved for a specific use. you could try using a variable named Sday instead of startday and Fday instead of Finishday

 

I tried both options but they doesn´t work.... :wallbash::(

Link to comment
Share on other sites

Sorry, I don't have any more ideas on what the problem could be. The code looks like it should work. Maybe you're just implementing it wrong?

 

Are you using it in a script or typing it into the "Result Script" box in the "Quest Stages" tab of the quest window?

 

If you are using it in a script, do you have it in the "Begin GameMode" block?

 

Actually, when you test it does it actually add any of the dialogue topics at all?

Link to comment
Share on other sites

Sorry, I don't have any more ideas on what the problem could be. The code looks like it should work. Maybe you're just implementing it wrong?

 

Are you using it in a script or typing it into the "Result Script" box in the "Quest Stages" tab of the quest window?

 

If you are using it in a script, do you have it in the "Begin GameMode" block?

 

Actually, when you test it does it actually add any of the dialogue topics at all?

 

Hi! Yes, I use it in a quest Script, in the "begin gamemode" block. Actually, it it doesn´t work when I test it....It don´t go to the Stage 7.... :wallbash:

 


scn 01Quest

Short doOnceX
Short StartDay
Short FinishDay
Short state


Begin GameMode

set doOnceX to 0

if ( GetStage aa1 == 6 ) && ( doOnceX == 0 ) 
                     			Set StartDay to GameDaysPassed
					Set state to 0
                                       Set FinishDay to (StartDay +3)
                                       AddTopic 1
           				Set doOnceX to 1
endif

if ( doOnceX == 1 )  && ( GameDaysPassed >= (StartDay +3) ) 
                                       Setstage aa1 7
                                       set state to 1
                                       AddTopic 2
                                       set doonceX to 2                        
endif

End

Edited by Wyrm1331
Link to comment
Share on other sites

The reason why it doesn't work is because you set doOnceX to 0 at the start of the script and therefore will never get into the second if statement.

 

I delete the "doOnceX to 0" at the start of the script, but it doesn´t work....i don´t know why...:(

Link to comment
Share on other sites

Not sure if you can use 1 and 2 as topics, but you might want to try and add debug lines to your script, so you can see what's happening. Something like:

 

set tempvar to GetStage aal
printc "dooncex: %.0f stage: %.0f" dooncex tempvar

Link to comment
Share on other sites

Not sure if you can use 1 and 2 as topics, but you might want to try and add debug lines to your script, so you can see what's happening. Something like:

 

set tempvar to GetStage aal
printc "dooncex: %.0f stage: %.0f" dooncex tempvar

 

This is what appears, also after this three days:

 

http://www.imagengratis.org/images/screenshot147.png

Edited by Wyrm1331
Link to comment
Share on other sites

Well I tried out what you had so far for your script and it worked. I did take out the addtopic lines since I was too lazy to make some topics. Are you sure you waited 3 days? Maybe you can try waiting 4 days just to make sure?

 

Also, unless you specifically declare it in your quest script, fquestdelaytime is 5 seconds. So the script only runs once every 5 seconds. After you waited the three days, did you wait a couple of seconds before checking the console and looking at your debug text?

Link to comment
Share on other sites

Maybe you can try waiting 4 days just to make sure?

 

I wait for 3, 4, 6 days....but the quest stage continuous in 6, it doesn´t go to the 7th stage....

 

After you waited the three days, did you wait a couple of seconds before checking the console and looking at your debug text?

 

Yes, but the debug text continues in the same form: dooncex 1 stage 6....

 

i don´t know what happens.... :wacko:

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

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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