Hello!
I'm trying to create 3 seperate dialogue options where I'd like them to reset once every 24 hours. Now it's not as easy as flagging the Hours Until Reset: option because I'd like randomized responses as well. So even though that single option will be reset, they'll still have access to the other randomized responses and I can't have that.
So the next option I came to is scripting and RegisterForSingleUpdateGameTime(24.0) does what I want really well. I can add a condition that the responses will only work if a variable is set, so at the end of a response I set the variable off and call a RegisterForUpdate function to turn the variable back on after 24 hours. That's great EXCEPT for the fact that I can only use it once.
For instance ...
"Can you do x for me?"
"Yes" ;Okay, make this option unavailable so reset for 24 hours(Register(24.0))
"Can you also do x for me?"
"Yes" ;But it's only been 4 hours since I chose the last option so choosing this option and adding another Register(24.0) will reset the previous register and the handler will only do the event for this option and forget about the other.
Now this is mostly all caused by the fact that I want randomized responses so it doesn't get dull but if there are no other alternatives I'll just have to revert to that. I just thought I'd ask to see if anyone had any other ideas on how I can accomplish this.
I just don't know where to go from here as I'm not very creative when it comes to scripting.
I was thinking something along the lines of using the gamehour variable
Function somefunction
float x = GameHour.GetValue()
SomeVariable.SetValue(+24 of x)
endfunction
But then I don't know what event besides OnUpdateGameTime can reliably recieve an event that can check when GameHour == SomeVariable without like going over into the next day.
Can magic effects last 24 hours? I could check for that but does it last through save games?
I'm just simply out of ideas.
I appreciate any help or advice anyone can give.