Difference between revisions of "Questions"
Jump to navigation
Jump to search
→Quest Scripting Question
imported>TheImperialDragon |
imported>Omzy |
||
Line 431: | Line 431: | ||
:I don't know if this'll work, but let me know how it goes. [[User:TheImperialDragon|TheImperialDragon]] 22:33, 7 June 2006 (EDT) | :I don't know if this'll work, but let me know how it goes. [[User:TheImperialDragon|TheImperialDragon]] 22:33, 7 June 2006 (EDT) | ||
--[[Omzy]] | |||
I've been working on mine and i finally got it to work. I don't know why this works and the other script doesn't, but i'll post mine exactly: | |||
<pre> | |||
ScriptName VoduniusNucciusQuestScript | |||
short stage | |||
float CurrentDay | |||
float CurrentTime | |||
short twoDaysDone | |||
Begin GameMode | |||
SetStage VoduniusNucciusQuest stage | |||
if stage == 21 | |||
if CurrentDay == 0 | |||
set CurrentDay to GameDaysPassed | |||
set CurrentTime to GameHour | |||
endif | |||
endif | |||
if stage == 21 | |||
if twoDaysDone == 0 | |||
if GameDaysPassed == ( CurrentDay + 2 ) | |||
if GameHour >= CurrentTime | |||
set twoDaysDone to 1 | |||
endif | |||
elseif GameDaysPassed > ( CurrentDay + 2 ) | |||
set twoDaysDone to 1 | |||
endif | |||
endif | |||
endif | |||
if stage == 22 | |||
StopQuest VoduniusNucciusQuest | |||
endif | |||
End | |||
</pre> | |||
*I don't reccommend using the "stage" variable in your script. I need it for a rare circumstance in my quest topic result scripts. | |||
The change is that instead of: | |||
if (stage == 21) && (twodaysdone == 0) | |||
;stuff | |||
endif | |||
I used: | |||
if stage == 21 | |||
if twoDaysDone == 0 | |||
;stuff | |||
endif | |||
endif | |||
The &&, even though it works in the Nirnroot script, somehow didn't do it for me. Tell me if it changes things, and perhaps why... | |||
Also, TheImperialDragon, the local variable CurrentDay in his script is reset within the same block as the code for the CurrentTime variable. By changing that variable, the condition will not allow modification of either variable more than once...UNLESS the GameDaysPassed variable is 0 (first day?), which is unlikely if the stage of the quest is 30. | |||
== Destroying/Removing Item/Object Created by PlaceAtMe Function == | == Destroying/Removing Item/Object Created by PlaceAtMe Function == |