Difference between revisions of "031D"
Jump to navigation
Jump to search
(weapon types) |
(page updates + values named) |
||
Line 1: | Line 1: | ||
− | {{ | + | {{Icon|trilogy}} '''HAS_CHAR_BEEN_DAMAGED_BY_WEAPON''' |
− | + | <hr /> | |
− | + | '''Description''' | |
− | + | : Checks if the character has been damaged by the specified weapon type | |
− | + | '''Syntax''' | |
− | + | : 031D: actor [''char handle''] hit_by_weapon [''int''] | |
− | + | '''Parameter''' | |
− | + | : [''char handle''] | |
− | This conditional opcode returns true if the character has been damaged by the specific weapon. The last damage done to the character can be cleared using opcode [[0467]]. Weapon numbers for projectiles do not get recognized so other values | + | :: The handle of the character |
+ | : [''int''] | ||
+ | :: Weapon type (see [[Weapon#Lists of Weapons|this]] in addition to below) | ||
+ | '''Native analog''' | ||
+ | : [[HAS_CHAR_BEEN_DAMAGED_BY_WEAPON]] | ||
+ | |||
+ | This conditional opcode returns true if the character has been damaged by the specific weapon or environment. The last damage done to the character can be cleared using opcode [[0467]]. Weapon numbers for projectiles do not get recognized so other values have to be used. Values outside the range of weapon numbers are supported for a variety of environmental damage. | ||
Vice City: | Vice City: | ||
− | + | {| class="wikitable" | |
− | + | ! Type || Enum || Notes | |
− | + | |- | |
− | + | | 31 || WEAPONTYPE_FLAMETHROWER || fire, not just Flamethrower | |
− | + | |- | |
− | + | | 39 || WEAPONTYPE_RAMMEDBYCAR || helicopter blades | |
− | + | |- | |
− | + | | 40 || WEAPONTYPE_RUNOVERBYCAR || vehicle collision | |
+ | |- | ||
+ | | 41 || WEAPONTYPE_EXPLOSION || explosion | ||
+ | |- | ||
+ | | 42 || WEAPONTYPE_UZI_DRIVEBY || drive-by | ||
+ | |- | ||
+ | | 43 || WEAPONTYPE_DROWNING || water | ||
+ | |- | ||
+ | | 44 || WEAPONTYPE_FALL || ground collision | ||
+ | |- | ||
+ | | 46 || WEAPONTYPE_ANYMELEE || any melee | ||
+ | |- | ||
+ | | 47 || WEAPONTYPE_ANYWEAPON || any weapons (melee, fire, gun, explosion) | ||
+ | |} | ||
+ | |||
+ | [[Category:OpCodes]] |
Revision as of 07:52, 31 December 2014
HAS_CHAR_BEEN_DAMAGED_BY_WEAPON
Description
- Checks if the character has been damaged by the specified weapon type
Syntax
- 031D: actor [char handle] hit_by_weapon [int]
Parameter
- [char handle]
- The handle of the character
- [int]
- Weapon type (see this in addition to below)
Native analog
This conditional opcode returns true if the character has been damaged by the specific weapon or environment. The last damage done to the character can be cleared using opcode 0467. Weapon numbers for projectiles do not get recognized so other values have to be used. Values outside the range of weapon numbers are supported for a variety of environmental damage.
Vice City:
Type | Enum | Notes |
---|---|---|
31 | WEAPONTYPE_FLAMETHROWER | fire, not just Flamethrower |
39 | WEAPONTYPE_RAMMEDBYCAR | helicopter blades |
40 | WEAPONTYPE_RUNOVERBYCAR | vehicle collision |
41 | WEAPONTYPE_EXPLOSION | explosion |
42 | WEAPONTYPE_UZI_DRIVEBY | drive-by |
43 | WEAPONTYPE_DROWNING | water |
44 | WEAPONTYPE_FALL | ground collision |
46 | WEAPONTYPE_ANYMELEE | any melee |
47 | WEAPONTYPE_ANYWEAPON | any weapons (melee, fire, gun, explosion) |