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

Question : ASC not available in the player BP #133

Open AntonyNifosi opened 7 months ago

AntonyNifosi commented 7 months ago

I am reading the documentation about GAS to try to understand how it works and implement it in my little project. First thing is a big thank you, this doc and project is so helpfull !

My question is : When you put your ASC in the player state, like in your GASDoc example, you have pointer to it in the player pawn, but from what I understand for example, the possessed function is called in the player bp when the Super::Possessed is called in the cpp, so at this time when the event possessed is trigger in the blueprint the ASC pointer is not valid yet, and I would like for example do some stuff like Wait for a tag added or removed. I thought about putting the super call at the end of the possessed function in the cpp but I think the super:: call needs to be done at the begining to have a valid playerstate for example. So how I am supposed to do to correctly use my ASC from the BP. For now in the possessed event on my bp I get the ASC from my playerState and it worked well, but is it the correct way of doing it, am I missing something ?

Any advice is welcome ! 😄