IPGetDamageBonusConstantFromNumber
From NWN Lexicon
Contents |
[edit] IPGetDamageBonusConstantFromNumber(int)
Converts a number into a damage bonus itemproperty constant.
void IPGetDamageBonusConstantFromNumber( int nNumber );
[edit] Parameters
nNumber
Number to convert to damage bonus constant.
[edit] Description
returns the appropriate ITEM_PROPERTY_DAMAGE_BONUS_= constant for nNumber
Do not pass in any number <1 ! Will return -1 on error
[edit] Remarks
Returns a DAMAGE_BONUS_* constant. Returns DAMAGE_BONUS_20 if nNumber is above 20, and -1 if nNumber is 0 or less.
[edit] Known Bugs
Uses RemoveItemProperty, which has an accumulator
bug that may give an erroneous Stacking error message or affect subsequent functions in the same script.- 1/16/04, NWN Toolset version vts026, game version 1.61.8042 English
[edit] Requirements
#include " x2_inc_itemprop "
[edit] Version
1.61
[edit] See Also
functions: | |
constants: |
author: Lilac Soul, editor: Peter Busby