tranek / GASDocumentation

My understanding of Unreal Engine 5's GameplayAbilitySystem plugin with a simple multiplayer sample project.
MIT License
4.52k stars 819 forks source link

AGDPlayerState::HealthChanged() delegate firing non-stop #82

Closed AlfieAllen closed 1 year ago

AlfieAllen commented 2 years ago

image

Hello I found suspicious behavior... Looks like HealthChangedDelegateHandle inside of GDPlayerState firing non-stop (2-3 times per second) even without any Health changing.

It is okay, or bug?

LoborchukAndrii commented 1 year ago

I think it's call health regeneration.

tranek commented 1 year ago

Yes, it's from the health regen GE. If you put a breakpoint there, you can see it in the Data parameter. image

This is as expected. In a production game, you can optimize this by setting an OngoingTagRequirement in the HealthRegen GE to pause the GE while the player has full health. You'd have to manually add a tag to the player when they have full health and remove it when they do not have full health.