Difference between revisions of "User:Rasikko"

Jump to navigation Jump to search
851 bytes added ,  07:50, 12 February 2018
imported>Rasikko
imported>Rasikko
Line 134: Line 134:
Days of the week are also index based, where Sundas is 0, and Loredas is 6. One day passes on Morndas, 18th, Last Seed,4E201. The game starts at 8:00AM, Sundas, 17th Last Seed 4E 201, which is exactly 16 hours til the next day.
Days of the week are also index based, where Sundas is 0, and Loredas is 6. One day passes on Morndas, 18th, Last Seed,4E201. The game starts at 8:00AM, Sundas, 17th Last Seed 4E 201, which is exactly 16 hours til the next day.
<br>
<br>
The following function is the same as using GameDay.GetValue(), but without using a property or [[GetValue - GlobalVariable]]. The idea behind all the following functions is to server an alternative to properties.
<source lang="papyrus">
Int Function GetCurrentGameMonth() Global
Int daysPassed = Utility.GetCurrentGameTime() as int
; the number of days left in the year when the game starts
Int daysRemainingGameStart =  136
; the number of days that have passed(which are not counted)
; when the game starts.
Int daysPassedGameStart = 228
Float monthlyAverage = 30.416667
if (daysPassed < daysRemainingGameStart)
return ((daysPassedGameStart + daysPassed) / monthlyAverage) as int
else
return ((daysPassed - daysRemainingGameStart) / monthlyAverage) as int
endif
EndFunction
</source>
<br>
This one should be self explanatory.
<source lang="papyrus">
<source lang="papyrus">
Int Function GetGameMonthTotalDays(int aiGameMonth = 0) Global
Int Function GetGameMonthTotalDays(int aiGameMonth = 0) Global
Anonymous user

Navigation menu