Pull Request #58

Game Feature - Adding Effects and Player State input binding fix

on August 13th, 2022

Game Feature - Adding Effects and Player State input binding fix #

New Features
  • Add ability to grant GameplayEffects from Game Features (89610a3c)
Bug Fixes
  • Ensure Game Feature Action ability input binding works across respawns for Player State ASC (7a0e543b)

While a game feature is active, it is now possible to respawn actors and have ability activation via bound input still functioning. Previously, it was OK only for ASC on Pawns.

Also includes slight changes to allow Game Feature Action to operate the same for Player State setup, with Actor Target being either the Avatar Actor (GSCModularPlayerStateCharacter) or the Owner Actor (GSCModularPlayerState)

Functional Tests have coverage to check this behavior in standalone / server.

Testing for clients still requires manual testing, but was checked as 👌 for Server / Client with Actor Target being either GSCModularPlayerStateCharacter or GSCModularPlayerState

  • Ensure InputBindingComponent is added to Pawn Avatar in Game Feature Action (110f2042)

InputBindingComponent / PlayerControlsComponent can only be added to Pawns, and relies on them having a PlayerController.

The Game Feature AddAbilities action was trying to Add a Component Request to PlayerState if the Game Feature Data Asset was using PlayerState as a Target Actor class. This could result in ensure errors in the PlayerControlsComponent on registration, and a Pawn Checked crash on End Pie.

This fix ensures the component request is made on the Pawn (the Avatar Actor as returned by the ASC if properly initialized via AbilityActorInfo). Also adds a fail safe check in ReleaseInputComponent > GetEnhancedInputSubsystem for PlayerControlsComponent to ensure it doesn't hard crash anymore.

Refactors
  • Add HasAbility helper to UGSCGameFeatureAction_AddAbilities (66575104)
  • Add note on requirement AGSCModularPlayerController for Game Feature AddInputMappingContext action (e3d783fe)