---
name: "animationSourcePhase"
type: command
status: ok
groups: ["Animations"]
arma3_since: "1.58"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/animationSourcePhase
revid: 336879
updated: 2023-01-04T16:43:50Z
---

# animationSourcePhase

*Command · Animations · Arma 3 v1.58*

## Description

Returns current animation phase of given source. Similar to [animationPhase](../commands/animationPhase.md) or [doorPhase](../commands/doorPhase.md) but designed to complement [animateSource](../commands/animateSource.md). This command could be used to obtain relative turret direction and gun elevation on a vehicle (see [#Example 2](../commands/animationSourcePhase.md#example-2)).

## Syntax

```sqf
object animationSourcePhase source
```

**Parameters:**

- `object`: [Object](../topics/Object.md)
- `source`: [String](../topics/String.md)

**Returns:** [Number](../topics/Number.md)

## Examples

### Example 1

```sqf
private _phase = house animationSourcePhase "Door_1_source";
```

### Example 2

```sqf
private _mainturretDirection =    deg (_marshall animationSourcePhase "mainturret"); // relative to Marshall direction
private _maingunElevation =        deg (_marshall animationSourcePhase "maingun");
private _obsturretDirection =    deg (_marshall animationSourcePhase "obsturret"); // relative to main turret direction
private _obsgunElevation =        deg (_marshall animationSourcePhase "obsgun");
```

## See also

[animateSource](../commands/animateSource.md) · [animationNames](../commands/animationNames.md) · [animate](../commands/animate.md) · [animationPhase](../commands/animationPhase.md) · [animateDoor](../commands/animateDoor.md) · [doorPhase](../commands/doorPhase.md)

<sub>Source: [BI Community Wiki — animationSourcePhase](https://community.bistudio.com/wiki/animationSourcePhase) (revision 336879).</sub>
