From 63dbd8c1ec11373e7ed5e7a90a89ab954c894ee9 Mon Sep 17 00:00:00 2001 From: Laura Date: Tue, 17 Dec 2024 01:18:15 +0100 Subject: [PATCH] Update TaskGotoEntityOffset and TaskGotoEntityOffsetXY --- TASK/TaskGotoEntityOffset.md | 25 ++++++++++++++++--------- TASK/TaskGotoEntityOffsetXy.md | 20 ++++++++++---------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/TASK/TaskGotoEntityOffset.md b/TASK/TaskGotoEntityOffset.md index f166fcb16..a8bbd376a 100644 --- a/TASK/TaskGotoEntityOffset.md +++ b/TASK/TaskGotoEntityOffset.md @@ -5,16 +5,23 @@ ns: TASK ```c // 0xE39B4FF4FDEBDE27 0x1A17A85E -void TASK_GOTO_ENTITY_OFFSET(Ped ped, Any p1, Any p2, float x, float y, float z, int duration); +void TASK_GOTO_ENTITY_OFFSET(Ped ped, cs_type(Any) Entity entity, cs_type(Any) int duration, float seekRadius, float seekAngleDeg, float moveBlendRatio, int gotoEntityOffsetFlags); ``` +Instructs the ped to go to the entity with the given offset. -## Parameters -* **ped**: -* **p1**: -* **p2**: -* **x**: -* **y**: -* **z**: -* **duration**: +```cpp +enum eSeekEntityOffsetFlags { + ESEEK_OFFSET_ORIENTATES_WITH_ENTITY = 1, + ESEEK_KEEP_TO_PAVEMENTS = 2 +}; +``` +## Parameters +* **ped**: The ped handle +* **entity**: The target entity handle +* **duration**: The duration in seconds or -1 for forever +* **seekRadius**: How many meters the destination is from the entity +* **seekAngleDeg**: The angle the destination is from the entity +* **moveBlendRatio**: The move blend ratio (speed) +* **gotoEntityOffsetFlags**: The goto entity offset flags diff --git a/TASK/TaskGotoEntityOffsetXy.md b/TASK/TaskGotoEntityOffsetXy.md index a4b3e4e95..eeda5b50a 100644 --- a/TASK/TaskGotoEntityOffsetXy.md +++ b/TASK/TaskGotoEntityOffsetXy.md @@ -5,17 +5,17 @@ ns: TASK ```c // 0x338E7EF52B6095A9 0xBC1E3D0A -void TASK_GOTO_ENTITY_OFFSET_XY(Ped ped, Entity entity, int duration, float xOffset, float yOffset, float zOffset, float moveBlendRatio, BOOL useNavmesh); +void TASK_GOTO_ENTITY_OFFSET_XY(Ped ped, Entity entity, int duration, float targetRadius, float offsetX, float offsetY, float moveBlendRatio, cs_type(BOOL) int gotoEntityOffsetFlags); ``` +Instructs the ped to go to the entity with the given offset. ## Parameters -* **ped**: -* **entity**: -* **duration**: -* **xOffset**: -* **yOffset**: -* **zOffset**: -* **moveBlendRatio**: -* **useNavmesh**: - +* **ped**: The ped handle +* **entity**: The target entity handle +* **duration**: The duration in seconds or -1 for forever +* **targetRadius**: How far away the ped needs to be from the target entity before it starts moving +* **offsetX**: The X offset +* **offsetY**: The Y offset +* **moveBlendRatio**: The move blend ratio (speed) +* **gotoEntityOffsetFlags**: The goto entity offset flags (see [`TASK_GOTO_ENTITY_OFFSET`](#_0xE39B4FF4FDEBDE27))