Function for Time of Day

From the CreationKit Wiki
Revision as of 02:16, 19 February 2012 by imported>Daemonjax (Created page with "returns: 0 <= return_value < 24 i.e. Midnight is 0, noon is 12, and 5:30 PM is 17.5 ---- Float FUNCTION getCurrentHourOfDay() float temp = Utility.GetCurrentGameTime() *...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

returns: 0 <= return_value < 24 i.e. Midnight is 0, noon is 12, and 5:30 PM is 17.5


Float FUNCTION getCurrentHourOfDay()

float temp = Utility.GetCurrentGameTime() * 24

return ((temp as int) % 24) + (temp - (temp as int))

ENDFUNCTION