Description

Hello,

I posted a bug submission some days ago on [Link Removed], however I received a mail asking me to repost it here instead. So here I go, even if it's not a question per say.

 

Description: The WaitGameplayTagQuery node doesn't work with EGameplayTagQueryExprType::NoTagsMatch because of the UAbilityAsync_WaitGameplayTagQuery::EvaluateTagQuery implementation. Indeed, to test if the query matches, the line "const bool bMatchesQuery = !TargetTags.IsEmpty() && TagQuery.Matches(TargetTags);" is executed. However, it is incorrect, since with EGameplayTagQueryExprType::NoTagsMatch (and presumably EGameplayTagQueryExprType::NoExprMatch), the correct line would be "const bool bMatchesQuery = TargetTags.IsEmpty() || TagQuery.Matches(TargetTags);". Indeed, if the target tags array is empty, the query matches.

Steps to Reproduce

UDN Case:  00535139

  • Create a gameplay tag for testing purpose, e.g. "Gameplay_Locked".
  • Add the WaitGameplayTagQuery node in a BP with the expression type to "No Tags Match", and add in the query tags the "Gameplay_Locked" tag.
  • Branch any BP node on the "Trigger" out exec pin from the WaitGameplayTagQuery node.
  • Make sure that the "Gameplay_Locked" tag is added on the tested Actor.
  • Make sure that the "Gameplay_Locked" tag is removed from the tested Actor after the WaitGameplayTagQuery has been reached.
  • Start the game.

Expected:

The WaitGameplayTagQuery node should resolve when the tested Actor loses the "Gameplay_Locked" tag.

 

Results:

The WaitGameplayTagQuery node will never resolve, thus the "Trigger" exec pin will never be reached.

 

Thank you,

I found it easiest to just create a Gameplay Ability that adds and removes loose tags while waiting for the GameplayTagQuery to succeed.  That way all the logic is together.
Baptiste

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-178485 in the post.

0
Login to Vote

Fixed
Fix Commit24426911
Main Commit24426911
CreatedFeb 25, 2023
ResolvedFeb 28, 2023
UpdatedApr 29, 2023
View Jira Issue