Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TaskGotoEntityOffset and TaskGotoEntityOffsetXY #1230

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions TASK/TaskGotoEntityOffset.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
AvarianKnight marked this conversation as resolved.
Show resolved Hide resolved
```

Instructs the ped to go to the entity with the given offset.

## Parameters
* **ped**:
* **p1**:
* **p2**:
* **x**:
* **y**:
* **z**:
* **duration**:
```cpp
AvarianKnight marked this conversation as resolved.
Show resolved Hide resolved
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
20 changes: 10 additions & 10 deletions TASK/TaskGotoEntityOffsetXy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Loading