> For the complete documentation index, see [llms.txt](https://ditoland-utplus.gitbook.io/ditoland/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/animstatemachine.md).

# AnimStateMachine

## AnimStateMachine

애니메이션 상태 머신 객체에요.\
[AnimStateMachineSetting](https://ditoland-utplus.gitbook.io/ditoland/api-reference/client/animstatemachinesetting) 에서 설정을 세팅할 수 있어요.\
애니메이션 상태 머신을 생성한 후 Game:SetCharacterAnimStateMachine 로 해당 애니메이션 상태머신을 사용 할 캐릭터로 설정하면,\
해당 캐릭터가 생성 될 때 해당 애니메이션 상태 머신이 설정 돼요.

### **함수**

<br>

| **ModeSequenceAnimState AddAnimState(string StateName, string ResourceID)** |
| --------------------------------------------------------------------------- |

단일 애니메이션을 플레이하는 애니메이션 상태를 추가해요. (추가할 상태 이름, 리소스 ID)

<br>

| **ModeSequenceAnimState AddAnimState(string StateName, string ResourceID, number PlayCount)** |
| --------------------------------------------------------------------------------------------- |

단일 애니메이션을 플레이하는 애니메이션 상태를 추가해요. (추가할 상태 이름, 리소스 ID, 플레이 횟수)

<br>

| **ModeSequenceAnimState AddAnimState(string StateName, string ResourceID, number Playcount, number PlaySpeed)** |
| --------------------------------------------------------------------------------------------------------------- |

단일 애니메이션을 플레이하는 애니메이션 상태를 추가해요. (추가할 상태 이름, 리소스 ID, 플레이 횟수, 플레이 속도)

<br>

| **ModeBlendAnimState AddBlendAnimState(string StateName, function BlendFunction)** |
| ---------------------------------------------------------------------------------- |

블렌드 애니메이션 상태를 추가해요. (추가할 상태 이름, 연결 함수)

<br>

| **ModeBlendAnimState AddBlendAnimState(string StateName, function BlendFunction, number PlayCount)** |
| ---------------------------------------------------------------------------------------------------- |

블렌드 애니메이션 상태를 추가해요. (추가할 상태 이름, 연결 함수, 플레이할 횟수)

<br>

| **void AddTransition(string FromState, string ToState)** |
| -------------------------------------------------------- |

애니메이션 상태 전이를 추가해요. (시작 상태 이름, 전이할 상태 이름)

<br>

| **void AddTransition(string FromState, string ToState, number BlendTime)** |
| -------------------------------------------------------------------------- |

애니메이션 상태 전이를 추가해요. (시작 상태 이름, 전이할 상태 이름, 블렌딩 시간)

<br>

| **void AddTransition(string FromState, string ToState, function Condition)** |
| ---------------------------------------------------------------------------- |

애니메이션 상태 전이를 추가해요. (시작 상태 이름, 전이할 상태 이름, 연결 함수)

<br>

| **void AddTransition(string FromState, string ToState, function Condition, number BlendTime)** |
| ---------------------------------------------------------------------------------------------- |

애니메이션 상태 전이를 추가해요. (시작 상태 이름, 전이할 상태 이름, 연결 함수, 블렌딩 시간)

<br>

| **void SetStartStateName(string StateName)** |
| -------------------------------------------- |

애니메이션 상태 머신이 활성화 될 때 시작 애니메이션 상태를 설정할 수 있어요. (설정할 상태 이름)

<br>

| **void ChangeAnimState(string ChangeStateName)** |
| ------------------------------------------------ |

해당 이름의 애니메이션 상태로 전이해요. (변경할 상태 이름)

<br>

| **RCharacterClient GetOwnerCharacter()** |
| ---------------------------------------- |

해당 상태머신을 사용하고 있는 캐릭터를 얻어요

\-- 샘플 --

```lua
local character = AnimStateMachine:GetOwnerCharacter()
```

\ <br>

## **사용 가능한 부모 오브젝트 기능들**

### **속성**

| **이름**                                                                                | **설명**               |
| ------------------------------------------------------------------------------------- | -------------------- |
| [**Parent**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object) | **부모 객체를 얻을 수 있어요.** |
| [**Name**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)   | **객체의 이름입니다.**       |

### **이벤트**

| **이름** | **설명** |
| ------ | ------ |

### **함수**

| **이름**                                                                                                    | **설명**                                                                                                                                                                                         |
| --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**ConnectChangeEventFunction**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object) | **추가된 값이 변경 될 때 호출되는 이벤트에요. (Value 이름, 연결 함수)**                                                                                                                                                |
| [**GetChild**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                   | **이름으로 자식 객체를 얻을 수 있어요. (찾고싶은 자식 객체 이름)**                                                                                                                                                      |
| [**GetChildList**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)               | **자식 객체의 리스트를 얻을 수 있어요.**                                                                                                                                                                      |
| [**IsCharacter**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                | **캐릭터인지 확인할 수 있어요.**                                                                                                                                                                           |
| [**IsStaticMesh**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)               | **스테틱 메시인지 확인할 수 있어요.**                                                                                                                                                                        |
| [**IsFX**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                       | **FX인지 확인할 수 있어요.**                                                                                                                                                                            |
| [**IsSound**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                    | **Sound인지 확인할 수 있어요.**                                                                                                                                                                         |
| [**IsPointLight**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)               | **포인트 라이트인지 확인할 수 있어요.**                                                                                                                                                                       |
| [**IsSpotLight**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                | **스포트 라이트인지 확인할 수 있어요.**                                                                                                                                                                       |
| [**IsSurfaceUI**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                | **서피스 UI인지 확인할 수 있어요.**                                                                                                                                                                        |
| [**IsScreenUI**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                 | **스크린 UI인지 확인할 수 있어요.**                                                                                                                                                                        |
| [**IsTouchUI**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                  | **터치 UI인지 확인할 수 있어요.**                                                                                                                                                                         |
| [**IsItem**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                     | **아이템인지 확인할 수 있어요.**                                                                                                                                                                           |
| [**IsNPC**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                      | **NPC인지 확인할 수 있어요.**                                                                                                                                                                           |
| [**IsScript**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                   | **스트립트인지 확인할 수 있어요.**                                                                                                                                                                          |
| [**IsCollider**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                 | **Collider인지 확인할 수 있어요.**                                                                                                                                                                      |
| [**IsWidget**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                   | **Widget인지 확인할 수 있어요.**                                                                                                                                                                        |
| [**IsCamera**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                   | **Camera인지 확인할 수 있어요.**                                                                                                                                                                        |
| [**IsValid**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)                    | **해당 오브젝트가 유효한지 확인 할 수있어요.**                                                                                                                                                                   |
| [**IsValidValue**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)               | **해당 오브젝트의 값이 유효한지 확인할 수 있어요.**                                                                                                                                                                |
| [**AddReplicateValue**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)          | **해당 객체에 서버, 클라이언트 간 동기화가 가능한 벡터를 추가해요. (추가할 Value 이름, Vector 데이터,** [**Enum.ReplicateType.타입**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/enums/replicatetype) **, 동기화 시간)**  |
| [**AddReplicateValue**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)          | **해당 객체에 서버, 클라이언트 간 동기화가 가능한 실수를 추가해요. (추가할 Value 이름, number 데이터,** [**Enum.ReplicateType.타입**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/enums/replicatetype) **, 동기화 시간)**  |
| [**AddReplicateValue**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)          | **해당 객체에 서버, 클라이언트 간 동기화가 가능한 bool를 추가해요. (추가할 Value 이름, bool 데이터,** [**Enum.ReplicateType.타입**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/enums/replicatetype) **, 동기화 시간)**  |
| [**AddReplicateValue**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)          | **해당 객체에 서버, 클라이언트 간 동기화가 가능한 문자열을 추가해요. (추가할 Value 이름, string 데이터,** [**Enum.ReplicateType.타입**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/enums/replicatetype) **, 동기화 시간)** |
| [**AddReplicateValue**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/object)          | **해당 객체에 서버, 클라이언트 간 동기화가 가능한 컬러를 추가해요. (추가할 Value 이름, Color 데이터,** [**Enum.ReplicateType.타입**](https://ditoland-utplus.gitbook.io/ditoland/api-reference/enums/replicatetype) **, 동기화 시간)**   |
