> ## Documentation Index
> Fetch the complete documentation index at: https://docs-unity.molca.id/llms.txt
> Use this file to discover all available pages before exploring further.

# ValveActionStep

> Valve-oriented step variant with action-specific completion rules.

**File:** `Assets/_MolcaSDK/_VR/Scripts/Scenario/Steps/ValveActionStep.cs`\
**Base:** [Step](/core/step)

## When to use

Use `Valve Action Step` when a VR training scenario needs this specific interaction as a step in a sequence. Configure entirely in the Inspector — no code required.

## Role

Completes when every **`ToolValveAction`** in **`valveActions`** fires **`onToolOperationComplete`**. On **`Initialize`**, sockets are disabled; on **activate**, each is **`enabled`**, listener registered, and **`ResetToolOperation()`** called. When all report done, **`Complete()`** is invoked after **`completionDelay`**.

## Code

```csharp theme={null}
// Designer: assign ToolValveAction[] or leave empty to auto-collect on this object / children.
// Each ToolValveAction must raise onToolOperationComplete when its tool op finishes.

using MolcaSDK.VR.Scenario;

public class RebindToolSockets : UnityEngine.MonoBehaviour
{
    public ValveActionStep step;

    public void SetAngles(int socketIndex, float angle) => step.SetTargetAngle(socketIndex, angle);
}
```

(`SetTargetAngle` exists on the step for per-socket targets — see full **`ValveActionStep.cs`**.)

## Troubleshooting

* **Stuck — not all sockets complete** — Ensure every **`ToolValveAction`** is in the array, **`onToolOperationComplete`** fires exactly once per intended op, and sockets are not left **`enabled`** from a prior run (deactivate should clear listeners).
* **Empty array error** — Assign **`valveActions`** or place **`ToolValveAction`** components on/under the same GameObject for auto-discovery.
* **Delayed completion** — Reduce **`completionDelay`** if the UX feels laggy after the last socket.

## Unity Editor

<Frame hint="ValveActionStep Inspector — compare fields to ValveStep." caption="ValveActionStep Inspector">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/ptmolcateknologinusantara/images/features/vr/steps/valve-action-step-inspector.png" alt="ValveActionStep in Unity Inspector" />
</Frame>
