Function for Time of Day

From the CreationKit Wiki
Revision as of 02:38, 19 February 2012 by imported>Tiara
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