Hi guys, i made one health bar for my character following 2 differents tutorials and this work perfectly…but sometimes, suddenly the game crash, the bar go to 0 and my character die. What i making wrong? I got this error
Your cast to SailorBP is failing, and you’re trying to get “Health” from a non-existent SailorBP (due to the cast failing).
You should always ensure that your casts are successful when interacting with them. For this purpose, you could right click and get an extra Return Node (or Duplicate your current one), connect the extra Return Node to Cast Failed and provide a generic value such as 0.0.
Made a quick example to demonstrate:
Yessss!! Thank u for your fast help Vaei!! I fixed the game now!!