RoundsToSeconds

From NWN Lexicon



Contents

[edit] RoundsToSeconds(int)

Converts a number of rounds into seconds.

float RoundsToSeconds(
    int nRounds
);

[edit] Parameters

nRounds

The number of rounds to convert into seconds.


[edit] Description

Returns the value of nRounds converted into seconds. A single round is 6.0 seconds.



[edit] Remarks

In P&P D&D, a round doesn't actually exsist. They declare them as turns, and so don't get confused by there being rounds in NwN.


[edit] Version

1.22

[edit] Example

// We wait 2 rounds until we apply damage from some poison. 
// Uses the first PC in the module
void main()
{
    // Get who to damage
    object oTarget = GetFirstPC();
    // Declare magical damage
    effect eDam = EffectDamage(5);
    // Get delay - should be 12.0 seconds.
    float fDelay = RoundsToSeconds(2);
    // Delay the damage
    // * Note: Putting EffectDamage directly into the function here would result in an invalid DelayCommand().
    DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
}

[edit] See Also

functions: 

TurnsToSeconds



 author: Charles Feduke, editor: Jasperre
 

Personal tools
Categories