Difference between revisions of "031D"
Jump to navigation
Jump to search
(page updates + values named) |
(added iii) |
||
Line 2: | Line 2: | ||
<hr /> | <hr /> | ||
'''Description''' | '''Description''' | ||
− | : Checks if the character has been damaged by the specified weapon | + | : Checks if the character has been damaged by the specified [[weapon]] or environment |
'''Syntax''' | '''Syntax''' | ||
: 031D: actor [''char handle''] hit_by_weapon [''int''] | : 031D: actor [''char handle''] hit_by_weapon [''int''] | ||
Line 9: | Line 9: | ||
:: The handle of the character | :: The handle of the character | ||
: [''int''] | : [''int''] | ||
− | :: Weapon | + | :: Weapon number (see [[Weapon#Lists of Weapons|this]] in addition to below) |
'''Native analog''' | '''Native analog''' | ||
: [[HAS_CHAR_BEEN_DAMAGED_BY_WEAPON]] | : [[HAS_CHAR_BEEN_DAMAGED_BY_WEAPON]] | ||
− | This conditional opcode returns true if the character has been damaged by the | + | This conditional opcode returns true if the character has been damaged by the specified weapon or environment. The last damage done to the character can be cleared using opcode [[0467]]. Values outside the range of weapon numbers are supported for a variety of environmental damage. Weapon numbers for projectiles do not get recognized so environmental values have to be used instead. |
− | + | == Environmental damage values == | |
{| class="wikitable" | {| class="wikitable" | ||
− | ! | + | ! {{Icon|3}} || {{Icon|VC}} || Enum || Notes |
|- | |- | ||
− | | 31 || WEAPONTYPE_FLAMETHROWER || fire, not just Flamethrower | + | | 9 || 31 || WEAPONTYPE_FLAMETHROWER || fire, not just Flamethrower |
|- | |- | ||
− | | 39 || WEAPONTYPE_RAMMEDBYCAR || | + | | 16 || 39 || WEAPONTYPE_RAMMEDBYCAR || damaged but not killed by vehicle |
|- | |- | ||
− | | 40 || WEAPONTYPE_RUNOVERBYCAR || vehicle | + | | 17 || 40 || WEAPONTYPE_RUNOVERBYCAR || instantly killed by vehicle, includes helicopter blades |
|- | |- | ||
− | | 41 || WEAPONTYPE_EXPLOSION || explosion | + | | 18 || 41 || WEAPONTYPE_EXPLOSION || explosion |
|- | |- | ||
− | | 42 || WEAPONTYPE_UZI_DRIVEBY || drive-by | + | | 19 || 42 || WEAPONTYPE_UZI_DRIVEBY || drive-by |
|- | |- | ||
− | | 43 || WEAPONTYPE_DROWNING || water | + | | 20 || 43 || WEAPONTYPE_DROWNING || water |
|- | |- | ||
− | | 44 || WEAPONTYPE_FALL || ground | + | | 21 || 44 || WEAPONTYPE_FALL || ground damage |
|- | |- | ||
− | | 46 || WEAPONTYPE_ANYMELEE || any melee | + | | - || 46 || WEAPONTYPE_ANYMELEE || any melee |
|- | |- | ||
− | | 47 || WEAPONTYPE_ANYWEAPON || any weapons (melee, fire, gun, explosion) | + | | - || 47 || WEAPONTYPE_ANYWEAPON || any weapons (melee, fire, gun, explosion) |
|} | |} | ||
+ | |||
+ | == Keywords == | ||
+ | has, actor, character, been, damaged, damage, hit, by, weapon | ||
[[Category:OpCodes]] | [[Category:OpCodes]] |
Revision as of 08:15, 27 January 2015
HAS_CHAR_BEEN_DAMAGED_BY_WEAPON
Description
- Checks if the character has been damaged by the specified weapon or environment
Syntax
- 031D: actor [char handle] hit_by_weapon [int]
Parameter
- [char handle]
- The handle of the character
- [int]
- Weapon number (see this in addition to below)
Native analog
This conditional opcode returns true if the character has been damaged by the specified weapon or environment. The last damage done to the character can be cleared using opcode 0467. Values outside the range of weapon numbers are supported for a variety of environmental damage. Weapon numbers for projectiles do not get recognized so environmental values have to be used instead.
Environmental damage values
Keywords
has, actor, character, been, damaged, damage, hit, by, weapon