Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Advanced FPS/TPS Sample Project for Unreal Engine 4's GameplayAbilitySystem plugin

License

NotificationsYou must be signed in to change notification settings

tranek/GASShooter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

GASShooter is an advanced FPS/TPS Sample Project for Unreal Engine 4's GameplayAbilitySystem (GAS) plugin. This is a sister project to theGASDocumentation and information about the techniques demonstrated here will be discussed in detail in the README there.

This is not production-ready code but a starting point for evaluating different techniques in GAS relating to using weapons. TargetActors with persistent hit results and ReticleActors particularly do a lot of code onTick().

Assets included come from Epic Games' ShooterGame learning project, Epic Games' Infinity Blade assets, or made by myself.

GASShooter is current withUnreal Engine 4.27. There are branches of this Sample Project for older versions of Unreal Engine, but they are no longer supported and are liable to have bugs or out of date information.

KeybindAction
TToggles between first and third person.
Left Mouse ButtonActivates the weapon's primary ability. Confirms targeting.
Middle Mouse ButtonActivates the weapon's alternate ability.
Right Mouse ButtonActivates the weapon's secondary ability.
Mouse Wheel UpSwaps to next weapon in inventory.
Mouse Wheel DownSwaps to previous weapon in inventory.
RReloads the weapon.
Left CtrlCancels targeting.
Left ShiftSprint.
EInteract with interactable objects.
Console CommandAction
killKills the local player.

The Hero character does have mana but no abilities currently use it. This project's inception started when the new BioShock was announced and the idea was to include BioShock-like upgradeable abilities. That made the scope too large, but it is something that may be revisited in the future.

Secondary ammo is not used. It would be used for things like rifle grenades.

Concepts covered

  • Ability Batching
  • Equippable weapons that grant abilities
  • Predicting weapon switching
  • Weapon ammo
  • Simple weapon inventory
  • Headshot bonus damage
  • Reusable, custom TargetActors
  • GameplayAbilityWorldReticles
  • Play replicated montages on multiple Skeletal Mesh Componentsbelonging to the AvatarActor in an ability
  • SubclassingFGameplayEffectContext to send additional information to GameplayCues
  • Character shield that drains before health is removed by damage
  • Item pickups
  • Single button interaction system. Press or Hold 'E' to interact with interactable objects including player reviving, a weapon chest, and a sliding door.

This project does not show predicting projectiles. I refer you to the Unreal Tournament source code for how to do that using a fake projectile on the owning client.

WeaponPrimary Ability (Left Mouse Button)Secondary Ability (Right Mouse Button)Alternate Ability (Middle Mouse Button)
RifleFire hitscan bullets based on the current fire mode.Aim down sights, reduces firing spread.Changes fire modes between full auto, semi auto, and burst.
Rocket LauncherFire a rocket.Aim down sights. Starts lock-on targeting for homing rockets. Press LMB to fire homing rockets at targets.None
ShotgunFire hitscan pellets based on the current fire mode.Aim down sights, reduces firing spread for pellets.Changes fire modes between semi auto and full auto.

Acknowledgements

KaosSpectrum provided significant contributions to figuring out how the ability batching system works and general feedback. Check out his game developmentblog.

About

Advanced FPS/TPS Sample Project for Unreal Engine 4's GameplayAbilitySystem plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp