Today's Lesson: Player XP & Leveling
Summary
1. We take a look at how we can setup a simple XP and leveling system for our role playing game (RPG) inside of Unreal Engine 4.
2. We go over the variables uses to create it along with the logic to progress through each of the levels by collecting the XP and exponentially increasing the difficulty of each level.
Virtus Learning Hub
✅ Experience, Level 변수 관리
◼️ exp, level 변수 생성
In Game Mode <ThirdPersonGameMode>
- New Variable: Experience
- Type: Integer
- Default Value: 0
- New Variable: Max Experience
- Type: Integer
- Default Value: 5
- New Variable: Level
- Type: Integer
- Default Value: 1
◼️ experience 표시
- In Widget Blueprint <MeleeHUD/RPGHUD>
- Progress - Percent - 바인딩 생성
ThirdPersonGameMode의 Exp/MaxExp → Return Value

◼️ level 표시
- Level - Text - 바인딩 생성
ThirdPersonGameMode의 Level → ToText(integer)
자릿수 결정: Minimum Integer Digits, 2
→ Return Value

✅ Experience 획득
In Character Blueprint <SimpleAI>
- Death Function
적이 죽으면 exp + 1
exp >= max exp 이면 Level + 1, exp 0, max exp * 2


✅ Result
- Magic Character Exp, Level

- Sword Character Exp, Level
