Open Eu4ng opened 1 year ago
PlayerState에서 AbilitySystemComponent와 AttributeSets를 생성하고 부착하며, BaseCharacter에서는 PlayerState의 AbilitySystemComponent와 AttributeSets을 약 포인터로 참조한다
GAS(Gameplay Abilities System)는 언리얼 엔진의 강력한 시스템으로 게임에서 유연하고 쉽게 수정할 수 있는 게임 플레이 메커니즘을 만들 수 있습니다. GAS는 복잡한 시스템이며 능력 비용, 예측 기간 및 타겟팅과 같이 학습해야 할 고급 기능과 개념이 많이 있습니다. 시스템과 시스템을 게임에서 효과적으로 사용하는 방법을 완전히 이해하려면 공식 Unreal Engine 문서 및 튜토리얼을 따르는 것이 좋습니다.
(1) GameplayAbility 생성
(2) AbilitySystemComponent 생성
(3) 캐릭터나 객체에 GameplayAbility 부여
(4) GameplayAbility 활성화
(5) GameplayEffect 생성
(6) GameplayEffect 적용
GAS (Gameplay Ability System) is a powerful framework in Unreal Engine 4 that allows developers to easily implement and manage complex gameplay mechanics and abilities for their games.
Here's a general overview of how to use GAS in your Unreal Engine 4 project:
Install the Gameplay Ability System plugin: The first step is to enable the Gameplay Ability System plugin in your Unreal Engine project. You can do this by going to the Plugins menu in the Unreal Editor and searching for "Gameplay Ability System".
Create ability classes: In GAS, abilities are represented as individual classes that define the behavior of each ability. You can create a new ability class by right-clicking in the Content Browser and selecting "Create New Class". Then, choose "Gameplay Ability" as the parent class.
Define ability attributes: Abilities in GAS are based on attributes that represent various aspects of the gameplay mechanics. You can define new attributes by creating a new "Gameplay Attribute" class.
Create ability tasks: Ability tasks are smaller pieces of functionality that are used to implement specific abilities. You can create a new ability task by right-clicking in the Content Browser and selecting "Create New Class". Then, choose "Gameplay Task" as the parent class.
Set up ability system components: Once you have created your ability classes and defined your attributes and tasks, you need to set up the ability system components in your game. This involves creating an Ability System Component (ASC) for each character or entity that will use abilities.
Use abilities in your game: Finally, you can use your abilities in your game by calling the appropriate functions on your ASC. For example, you might call the "ActivateAbility" function to trigger a specific ability.
These are the basic steps to use the Gameplay Ability System in Unreal Engine 4. However, GAS is a complex framework that can take some time to fully understand and utilize effectively. I recommend checking out the official Unreal Engine documentation on GAS for more information and examples.
AttributeSet
GameplayAbility
AbilitySystemComponent
CharacterBase
멤버 변수
GameplayEffect
GameplayCue