GetSizeModifier

From NWN Lexicon


Contents

[edit] GetSizeModifier(object)

Gets the creature's applicable size modifier.

int GetSizeModifier(
    object oCreature
);

[edit] Parameters

oCreature

The creature whose size modifier you want.


[edit] Description

Gets the creature's applicable size modifier.



[edit] Remarks

According to the comments in the function's header, this is used in Bigby's Forceful hand for the 'bullrush' attack.


[edit] Requirements

#include " x0_i0_spells "


[edit] Version

???

[edit] Example

// Function source code from x0_i0_spells.
int GetSizeModifier(object oCreature)
{
    int nSize = GetCreatureSize(oCreature);
    int nModifier = 0;
    switch (nSize)
    {
    case CREATURE_SIZE_TINY: nModifier = -8;  break;
    case CREATURE_SIZE_SMALL: nModifier = -4; break;
    case CREATURE_SIZE_MEDIUM: nModifier = 0; break;
    case CREATURE_SIZE_LARGE: nModifier = 4;  break;
    case CREATURE_SIZE_HUGE: nModifier = 8;   break;
    }
    return nModifier;
}

[edit] See Also

functions: 

GetCreatureSize

constants: 

CREATURE_SIZE_*



author: Mistress

Personal tools
Categories