Difference between revisions of "SendDamageToEntity"
From Nomad DB
m |
m |
||
Line 7: | Line 7: | ||
* '''targetPawnId''' (string): [[EntityId|ID]] of the [[Pawn|pawn]] to be damaged | * '''targetPawnId''' (string): [[EntityId|ID]] of the [[Pawn|pawn]] to be damaged | ||
* '''sourceEntityId''' (string): [[EntityId|ID]] of the entity the damage should logically come from | * '''sourceEntityId''' (string): [[EntityId|ID]] of the entity the damage should logically come from | ||
− | * '''damageType''' ( | + | * '''damageType''' (number): [[#Damage Types|Type]] of damage to send |
− | * '''damageAmount''' ( | + | * '''damageAmount''' (number): Amount of damage to send |
− | * '''damageLocation''' ( | + | * '''damageLocation''' (number): Part of the body the pawn should be damaged at (see [[#Damage Locations]]) |
== Example == | == Example == |
Latest revision as of 15:50, 15 April 2020
Sends a damage event to the specified pawn.
Syntax
SendDamageToEntity(targetPawnId, sourceEntityId, damageType, damageAmount, damageLocation)
- targetPawnId (string): ID of the pawn to be damaged
- sourceEntityId (string): ID of the entity the damage should logically come from
- damageType (number): Type of damage to send
- damageAmount (number): Amount of damage to send
- damageLocation (number): Part of the body the pawn should be damaged at (see #Damage Locations)
Example
Causes the player to send himself bullet damage.
SendDamageToEntity(GetLocalPlayerEntityId(), GetLocalPlayerEntityId(), 3, 100, 512)
Parameters
Damage Types
ID | Type |
---|---|
3 | Bullet |
4 | Explosion |
5 | Cut |
7 | Burn |
16 | Instant Kill |
Damage Locations
ID | Location |
---|---|
1 | Torso |
2 | Pelvis |
4 | Shoulders |
8 | Left upper arm |
16 | Left forearm |
32 | Left hand |
64 | Right upper arm |
128 | Right forearm |
256 | Right hand |
512 | Head |
1024 | Left leg |
2048 | Left foot |
4096 | Right leg |
8192 | Right foot |