taskGoToEntityWhileAimingAtEntity
TASK_GO_TO_ENTITY_WHILE_AIMING_AT_ENTITY0x97465886D35210E9The GTA V native TASK_GO_TO_ENTITY_WHILE_AIMING_AT_ENTITY of the TASK namespace, as LS:MP client scripts call it: the global function taskGoToEntityWhileAimingAtEntity, in JavaScript and in Lua.
taskGoToEntityWhileAimingAtEntity(
ped: Ped,
entityToWalkTo: Entity,
entityToAimAt: Entity,
speed: number,
shootatEntity: boolean,
targetRadius: number,
slowDistance: number,
useNavMesh: boolean,
instantBlendToAim: boolean,
firingPattern: Hash
): voidtaskGoToEntityWhileAimingAtEntity(
ped: Ped,
entityToWalkTo: Entity,
entityToAimAt: Entity,
speed: number,
shootatEntity: boolean,
targetRadius: number,
slowDistance: number,
useNavMesh: boolean,
instantBlendToAim: boolean,
firingPattern: Hash
)Usage
JavaScript
taskGoToEntityWhileAimingAtEntity(
ped, entityToWalkTo, entityToAimAt, speed, shootatEntity, targetRadius, slowDistance,
useNavMesh, instantBlendToAim, firingPattern
);Lua
taskGoToEntityWhileAimingAtEntity(
ped, entityToWalkTo, entityToAimAt, speed, shootatEntity, targetRadius, slowDistance,
useNavMesh, instantBlendToAim, firingPattern
)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
entityToWalkTo | Entity | number | integer |
entityToAimAt | Entity | number | integer |
speed | float | number | number |
shootatEntity | BOOL | boolean | boolean |
targetRadius | float | number | number |
slowDistance | float | number | number |
useNavMesh | BOOL | boolean | boolean |
instantBlendToAim | BOOL | boolean | boolean |
firingPattern | Hash | number | integer |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
shootatEntity:
If true, peds will shoot at Entity till it is dead.
If false, peds will just walk till they reach the entity and will cease shooting.
Reference
- Namespace
- Tasks TASK
- In the game
void TASK_GO_TO_ENTITY_WHILE_AIMING_AT_ENTITY(Ped ped, Entity entityToWalkTo, Entity entityToAimAt, float speed, BOOL shootatEntity, float targetRadius, float slowDistance, BOOL useNavMesh, BOOL instantBlendToAim, Hash firingPattern)- Hash
0x97465886D35210E9