Difference between revisions of "Talk:Bethesda Tutorial Scenes"
Jump to navigation
Jump to search
imported>Layam |
imported>Lmstearn |
||
Line 11: | Line 11: | ||
Values 0 and 24 would both come back as midnight. Also if you use 25 you get 1am, 26 2am ect. --[[User:SoaringChris137|SoaringChris137]] 16:53, 3 March 2012 (EST) | Values 0 and 24 would both come back as midnight. Also if you use 25 you get 1am, 26 2am ect. --[[User:SoaringChris137|SoaringChris137]] 16:53, 3 March 2012 (EST) | ||
::Using [[http://www.creationkit.com/Function_for_Time_of_Day this]] we can try: | |||
string Function GetGreeting() | |||
string MornArvo = "" | |||
float Time = Utility.GetCurrentGameTime() | |||
Time -= Math.Floor(Time) ; Remove "previous in-game days passed" bit | |||
Time *= 24 ; Convert from fraction of a day to number of hours | |||
if Time < 13 | |||
MornArvo = "Good Morning" | |||
elseif Time > 17 | |||
MornArvo = "Good Evening" | |||
else | |||
MornArvo = "Good Afternoon" | |||
endif | |||
Return MornArvo | |||
EndFunction --[[User:Lmstearn|Lmstearn]] ([[User talk:Lmstearn|talk]]) 2015-01-27T07:21:07 (EST) |
Revision as of 07:21, 27 January 2015
Extra Credit
Can someone hint without too much spoilers how to make Bendu greet Gilfre different depending on time of day? Guess one way is placing timer check with GetCurrentTime, but would require 3 different phases in the scene which seems wrong? Another way I guess might be with a scene where the greet only trigger if they should come within a specific distance (with package template of some kind). --Nemesis 09:16, 15 February 2012 (EST)
- I would like to know this as well. GetCurrentTime does seem like the way to go, but it is unclear to me what the range is of the variable that is returned. Is time a number between 1-24? 0-1? And should the function be ran on Subject? --Mr6 10:22, 16 February 2012 (EST)
- GetCurrentTime should return a value between 0 and 24, although I'm not sure which of those two values should be returned at midnight. It's not a reference function, so it doesn't need to be called on anything.
- -- Cipscis 15:52, 16 February 2012 (EST)
Values 0 and 24 would both come back as midnight. Also if you use 25 you get 1am, 26 2am ect. --SoaringChris137 16:53, 3 March 2012 (EST)
- Using [this] we can try:
string Function GetGreeting() string MornArvo = "" float Time = Utility.GetCurrentGameTime() Time -= Math.Floor(Time) ; Remove "previous in-game days passed" bit Time *= 24 ; Convert from fraction of a day to number of hours if Time < 13 MornArvo = "Good Morning" elseif Time > 17 MornArvo = "Good Evening" else MornArvo = "Good Afternoon" endif Return MornArvo EndFunction --Lmstearn (talk) 2015-01-27T07:21:07 (EST)