I tried use lyra health component event to change the material color with health as shown in the image but nothing happens when the health drops below 70
There is multiplayer plugin in lyra example it has team colors data asset somewhere, you can add team color and change it. However i do not remember now location and name of it.
Does the multiplayer plugin have any health indicators I can use to change the color? my problem is I don’t know how to properly use the lyra health component and how to make a certain health value triggers an event that affects a character material (in my case a glowing piece on the back that glows red when health drops below a certain value)
Best Lyra tutorials i found so far:
Do not use whole plugin to change colors, instead see how they did it there.
ps.
There are PDFs with diagrams about data assets in Lyra, very useful.
Thank you so much!! weirdly I’ve never came across these tutorials searching online! hopefully I can find the solution and report back. Thanks again )
Don’t create a DMI on a timeline update. Create it elsewhere and store the return in a variable. You only need to create a DMI for a material once. It’s a lifetime class. Use the variable as target to set the vector parameter.
You’ll also want to:
“Play from Start” each time the health is changed. Think about multiple hits in quick secession.
Store the last updated lerp color.
Use variables for LERP (A,B)
For this to work in multiplayer you have to update the material on the server AND on every client.
Skeletal meshes, Materials do not replicate.
Thanks for the reply!! so I did what you said above but still nothing happens when the character takes damage and health drop below 90 I think I’m inputting the Lyra health wrongly here and I’m not sure how to identify the error here! I’m also creating this for a single player shooter experience so no need to update this on the server I just want to know how to implement the Lyra health correctly to affect the health color.
Everything looks good.
Debug it with a print string. Branch[true] → print
outside of that verify the parameter name (case sensitive)
The DMI parameter with the timeline works well when I connect it directly to begin play event but doesn’t work when I connect it to the Lyra health event so the parameter name is not the problem.
I connected the print string to the true branch and it showed nothing so I tried to do it in the bp_hero_shooter blueprint and it worked.
so to be detailed with the problem:
-Lyra has a blueprint for the character cosmetic, which has the character mesh for the DMI but no events are working other than the begin play event.
-Lyra also has a blueprint for the character logic (the print string connected Lyra health event work here but I can’t setup the DMI because the blueprint has no character mesh)
So I have two blueprints now one with the mesh and DMI but events are not working, and one with the event working but no mesh to set the DMI.
What I’m looking for now is either a way to reference the DMI as a variable in the event-working blueprint or to know how enable the events in the cosmetic blueprint.

