Difference between revisions of "User talk:Rasikko"

Jump to navigation Jump to search
457 bytes added ,  05:30, 2 October 2021
m
no edit summary
imported>Rasikko
m
imported>Rasikko
m
 
Line 1: Line 1:
== Various Array Helper Functions ==
Work in progress.
; Change Form to whatever the types are.
<source lang="papyrus">
Bool Function ArrayIncludes(Form akArray, Form akValueToSearchFor)
    ; Returns true of akArray contains akValueToSearchFor
   
    int = 0
    int index = akArray.length
    while i < index
        if akArray[i] == akValueToSearchFor
            return true
        endif
        i += 1
    endif
return false
EndFunction
</source>
==  Time Functions ==
==  Time Functions ==
Self explanatory. They will all require GetFractionOfDay and assume that you will use the globalvariable GameDaysPassed.
Self explanatory. They will all require GetFractionOfDay and assume that you will use the globalvariable GameDaysPassed.


<source lang=papyrus>
<source lang=papyrus>
Float Fuction GetFractionOfDay(Float daysPassed)
Float Function GetFractionOfDay(Float daysPassed)
     ; Returns the hours passed for the day as a fraction.
     ; Returns the hours passed for the day as a fraction.
     if daysPassed < 1.0
     if daysPassed < 1.0
Anonymous user

Navigation menu