IPGetWeaponAppearanceType

From NWN Lexicon


Contents

[edit] IPGetWeaponAppearanceType(object, int, int)

Returns a weapon appearance type for the specified weapon part.

int IPGetWeaponAppearanceType(
    object oWeapon,
    int nPart,
    int nMode
);

[edit] Parameters

oWeapon

The object being examined.

nPart

ITEM_APPR_WEAPON_MODEL_* Weapon part for which an appearance type is to be returned.

nMode

X2_IP_WEAPONTYPE_* Whether next, previous or a random appearance type is returned.


[edit] Description

This function determines the current appearance type for a specified weapon part (nPart) of oWeapon and returns either the next / previous appearance type (relative to the current appearance type), or a random valid appearance type, drawn from the full list of appearance types for the specified weapon part.

The value of the parameter nMode determines whether the next, previous, or a random appearance type is returned.

nMode can be any of the following:

  • X2_IP_WEAPONTYPE_NEXT returns the next appearance type
  • X2_IP_WEAPONTYPE_PREV returns the previous appearance type
  • X2_IP_WEAPONTYPE_RANDOM returns a random appearance type

The value of nPart determines the weapon part number, for which an appearance type is returned. nPart can take on any of the following values:

  • ITEM_APPR_WEAPON_MODEL_BOTTOM
  • ITEM_APPR_WEAPON_MODEL_MIDDLE
  • ITEM_APPR_WEAPON_MODEL_TOP

[edit] Remarks

The function assumes that every weapon part (-> nPart) has exactly 9 appearance types.

This function selects one appearance type from the list of 9 types for the specified weapon part.

This is an internal function. See the note near the top of #include index for more details.


[edit] Requirements

#include " x2_inc_itemprop "


[edit] Version

1.61

[edit] See Also

functions: 

IPGetRandomArmorAppearanceType

constants: 

ITEM_APPR_*



author: motu99, editor: Mistress

Personal tools
Categories