IPGetWeaponAppearanceType(object, int, int)
Returns a weapon appearance type for the specified weapon part.
int IPGetWeaponAppearanceType( object oWeapon, int nPart, int nMode );
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.
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
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.
Requirements
#include "x2_inc_itemprop"
Version
1.61
See Also
functions: | GetItemAppearance | IPGetArmorAppearanceType | IPGetNextArmorAppearanceType | IPGetNumberOfArmorAppearances | IPGetPrevArmorAppearanceType | IPGetRandomArmorAppearanceType |
constants: | ITEM_APPR_* |
categories: | Item Creation Functions | Item Properties Functions |
author: motu99, editor: Mistress