Quests Conditions applying only once?
Posted: Tue Apr 18, 2023 2:38 am
Good morning Toni,
I hope you are well!
I am trying to set some farming quests to be dependent on the time of the day. A mission to plant some crops, that can only be offered by the quest Giver, when a Lua Variable TimeOfDay is = to an int between 0 and 3. (0 = morning, 1 = Midday, 2 = Evening, 3 = Night)
I have the code done to update this variable at runtime, and its all good, however, the mission availability is not working as intended.
I have the mission with the following condition:
Lua Variable TimeOfDay == 1.
The game state begins with TimeOfDay at 0. I click a button to fast forward time to the next slot, and I update the variable at this point via script:
DialogueLua.SetVariable("TimeOfDay", desiredTime);
This updates correctly. The quest becomes grantable and all good.
The problem comes when the time moves again, the variable TimeOfDay has changed, but the quest remains grantable.
Is there a better way to do this? To make quests dependent on the time of the day?
JFI im using Azure Dynamic Sky for the time and weather.
Thanks for the help as always!
Nico
I hope you are well!
I am trying to set some farming quests to be dependent on the time of the day. A mission to plant some crops, that can only be offered by the quest Giver, when a Lua Variable TimeOfDay is = to an int between 0 and 3. (0 = morning, 1 = Midday, 2 = Evening, 3 = Night)
I have the code done to update this variable at runtime, and its all good, however, the mission availability is not working as intended.
I have the mission with the following condition:
Lua Variable TimeOfDay == 1.
The game state begins with TimeOfDay at 0. I click a button to fast forward time to the next slot, and I update the variable at this point via script:
DialogueLua.SetVariable("TimeOfDay", desiredTime);
This updates correctly. The quest becomes grantable and all good.
The problem comes when the time moves again, the variable TimeOfDay has changed, but the quest remains grantable.
Is there a better way to do this? To make quests dependent on the time of the day?
JFI im using Azure Dynamic Sky for the time and weather.
Thanks for the help as always!
Nico