Unreal Engine 5.6 GAS Tutorial #23 (Sep 2025) – Katana Combat Stun, Blocking & Attack Interrupts
Автор: Amar Sen
Загружено: 2025-09-20
Просмотров: 283
🌟 Unreal Engine 5 (UE5) Gameplay Ability System (GAS) — Stun + Attack Interrupts + Katana Trail Fix
In this tutorial you’ll learn how to:
Add a stun Gameplay Effect (GE_Stun) that blocks ability activation via gameplay tags.
Apply the stun when a character gets hit.
Block attack abilities while stunned using Activation Block Tags.
Fix katana trail VFX so it stops on animation interrupt.
Prevent interrupted attacks from applying damage using Play Montage and Wait plus an Interrupted flag.
Keywords: Unreal Engine 5, UE5, gameplay ability system, GAS, katana combat, blocking system, melee combat tutorial, multiplayer
STEP-BY-STEP (high level)
1) Create GE_Stun (Gameplay Effect)
Duration Policy: Has Duration (recommended 0.75–1.0 seconds)
Granted Tag: Character.State.Stun
2) Apply the stun when the target is hit
In your hit reaction or damage ability, call ApplyGameplayEffectToOwner or ApplyGameplayEffectToTarget with GE_Stun.
Make sure this runs on the server for replication.
3) Block attacks while stunned
In each attack ability (for example GA_LightAttack), add Activation Block Tag: Character.State.Stun
4) Fix katana trail VFX on interruption
Add AnimNotifies: KatanaAttackStart and KatanaAttackEnd in your attack montages.
Use Play Montage and Wait in the ability, hook OnNotifyBegin and OnNotifyEnd to StartTrail and StopTrail.
On OnInterrupted or OnCancelled also call StopTrail.
Add a small failsafe delay that calls StopTrail in case notifies are skipped.
5) Prevent interrupted attacks from dealing damage
Add a boolean variable called bInterrupted (default set to false).
On montage interrupted, set bInterrupted = true.
Before applying damage, use a Branch: if bInterrupted is false, then apply damage.
6) Multiplayer testing
Run PIE with server and client.
Ensure Gameplay Effect application, tag blocking, and montage logic replicate properly across both.
SUMMARY
Use tag-based stuns (Character.State.Stun) and Gameplay Effects to control ability activation.
Use Play Montage and Wait, notifies, and an interrupted flag to reliably handle animation interruptions and VFX cleanup.
Always test authority (server) vs client to confirm consistent multiplayer behaviour.
NEXT STEPS
Add hit-stop for more impactful combat.
Improve VFX and SFX for stun and blocking.
Add AI reactions to stun.
Expand mechanics with parry, counters, and combo or finisher systems.
Experiment with client-side prediction for smoother multiplayer combat.
👍 Like the content? Subscribe for more UE5 GAS tutorials and action RPG katana combat mechanics!
#UnrealEngine5
#UE5Tutorial
#UnrealEngineTutorial
#GameDev
#GameDevelopment
#IndieDev
#LevelDesign
#UnrealEngine
#MeleeCombat
#KatanaCombat
#CombatSystem
#BlockingSystem
#GameplayAbilitySystem
#GASTutorial
#MultiplayerGames
#ActionRPG
#LearnGameDev
#GamingCommunity
#GameDesign
#VideoGameDevelopment
#UnrealEngineCommunity
#IndieGameDev
#GameDevTutorial
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: