I want to add a thing that can take damage. That’s it. A simple cube that can take damage.
You would imagine this is a 5 minute job if that considering this is a) conceptually brain dead simple and b) lyra is touted as a great starting point with super clean modular code
…but here i am, many hours later, feeling utterly depressed.
After a while (due to pure luck and grim determination, not because it was well documented) i have figured out that if i create an actor (blueprint), give it a “Lyra Health Component” and an “Ability System Component” then the “ULyraDamageExecution::Execute_Implementation” function will be called in the LyraDamageExecution.cpp class
How we get to LyraDamageExecution.cpp i have no idea but what i do know is that when i shoot my cube and we arrive at this function the health is already at zero. I try to set the health in the health component but you can’t do that.
For… some reason… the way that initial health is set, at least in terms of the mannequin that comes with lyra, is to have a “Lyra Ability System Component” constructed and then pass that in to the “InitializeWithAbilitySystem” function of the “Lyra Health Component” which will eventually set the “HealthSet” of the “Lyra Health Component” to the return value of “AbilitySystemComponent->GetSet();” which… does… something…
alright, getting lost, lets just copy whatever they were doing in the mannequin to my cube: i go to my cube actor blueprint and on begin play i call “initialise with ability system” on the health component passing in my ability system component… aaaand you can’t do that. it needs to be a LYRA ability system component
ok so lets change the “ability system” of my cube to a “lyra ability system” and see where we can get to…and “lyra ability system” is not blueprint spawnable.
right… set the metadata for the uclass to make it spawnable… feels like i’m not doing it right… but whatever i can make a lyra ability system component now. So i add it to my cube, i can call the “initialise from ability system” on the “begin play” event of my cube…
and it fails saying the ability system health set is NULL
so somehow i need to create a “lyra health set” now? but that also is not available? Or i am missing some knowledge surrounding it idk.
at this point i am almost certain this can’t be correct so i stopped to write this post explaining my unreasonably long and arduous journey to create a f-ing cube that can be damaged.
please help i am going insane.