HoursToSeconds

From NWN Lexicon
Revision as of 10:19, 21 August 2012 by Dood (talk | contribs) (Created page with " =HoursToSeconds(int)= This function calculates the number of actual seconds in n game hour(s). float  HoursToSeconds(      int  nHo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.



HoursToSeconds(int)

This function calculates the number of actual seconds in n game hour(s).

 float  HoursToSeconds(
     int  nHours
);

Parameters

nHours

The number of hours to turn into seconds.


Description

Converts nHours into a number of seconds. The result will depend on how many minutes there are per hour, configured in the advanced properties of the module (default is 2 minutes per hour, so the default settings would return 120 seconds if nHours were 1).



Version

1.28

Example

// Delay a speakstring command for 1 hour (executed on the object that calls it)
void main()
{
    // Declare the variables
    string sHello = "Hello";
    float fSeconds = HoursToSeconds(1);
    // Delay the speakstring
    DelayCommand(fSeconds, SpeakString(sHello));
}


See Also

functions: 

SetTime



 author: Charles Feduke, editor: Jasperre, additional contributor(s): Lilac Soul