# TASK::_TRANSITION_SCENARIO_TO_CONDITIONAL_ANIM

- **Hash:** `0x79197F7D2BB5E73A`
- **Namespace:** TASK
- **Runtime name (Lua/JS):** `TransitionScenarioToConditionalAnim`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/TASK/_TRANSITION_SCENARIO_TO_CONDITIONAL_ANIM

## Signature

```c
BOOL _TRANSITION_SCENARIO_TO_CONDITIONAL_ANIM(Ped ped, int scenarioPoint, const char* clipsetDict, const char* clipName, const char* fromConditionalAnim, int flags);
```

## Parameters

- `ped` (`Ped`)
- `scenarioPoint` (`int`)
- `clipsetDict` (`const char*`)
- `clipName` (`const char*`)
- `fromConditionalAnim` (`const char*`)
- `flags` (`int`)

## Returns

`BOOL`

## Description

*Source: alloc8or RDR3 NativeDB*

Requests an authored transition for a ped that is currently using a scenario point, switching into a specific conditional/clipset branch defined for that scenario.

Meta / authoring:
- This mirrors entries in "script_common_ca.meta" where a transition links a <FromConditionalAnims> key to a target <ClipSet> (clipsetDict + clipName).
- fromConditionalAnim should match the <FromConditionalAnims> name for the transition (some scripts pass 0 when they don’t care / use the default authored path).

Notes:
- Scripts commonly call PED::_ADD_SCENARIO_TRANSITION(ped) immediately before this native.
- Return value only indicates the transition request was accepted/triggered; scripts often verify the ped is still using the scenario point afterward (PED::IS_PED_USING_THIS_SCENARIO).

C++ style usage (from scripts):
- PED::_ADD_SCENARIO_TRANSITION(ped);
- if (TASK::_TRANSITION_SCENARIO_TO_CONDITIONAL_ANIM(ped, scenarioPoint, clipsetDict, clipName, fromConditionalAnim, 0)) {
    if (PED::IS_PED_USING_THIS_SCENARIO(ped, scenarioPoint)) {
      // transition took; continue state machine
    }
  }

Example video: https://imgur.com/a/ReSsWNj

*Source: VORPCORE RDR3natives*

Smoothly transitions an active scenario actor (ped) into a specific conditional / clipset defined in the scenario's conditional-anim graph, breaking or restarting the scenario.
Returns `true` if the transition was successfully triggered, or `false` if it failed

## Usage

### Lua

```lua
local retval = TransitionScenarioToConditionalAnim(ped, scenarioPoint, clipsetDict, clipName, fromConditionalAnim, flags)

-- always available, by hash
local retval = Citizen.InvokeNative(0x79197F7D2BB5E73A, ped, scenarioPoint, clipsetDict, clipName, fromConditionalAnim, flags, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = TransitionScenarioToConditionalAnim(ped, scenarioPoint, clipsetDict, clipName, fromConditionalAnim, flags);

// by hash
const retval = Citizen.invokeNative('0x79197F7D2BB5E73A', ped, scenarioPoint, clipsetDict, clipName, fromConditionalAnim, flags, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0x79197F7D2BB5E73A, ped, scenarioPoint, clipsetDict, clipName, fromConditionalAnim, flags);
```

- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
