Hi, So I’m prototyping a game right now and I’m trying to design a health system using a Blueprint interface that has two functions which is Damage and heal. The reason I’m using a blueprint interface is to hopefully allow for communication of damage between players, breakable objects, weapons, etc. and to allow for user made content to be a little easier to implement, such as custom weapons and such. I’m hoping Blueprint Interfaces are a good way for communication with base game items and user made content. but anyway onto the problem I actually need answered.
I have a Character blueprint and two test objects the player can walk up to and interact with to test the health system. one object damages the player and the other heals the player upon interaction. Now the problem is, is that the objects don’t seem to fire the heal or damage event inside the player blueprint. Now I tested the interaction between the objects to see that when I press the use key and interact with them they actually fire the interaction event, but don’t continue the heal/damage code or even the event inside the player blueprint.
Now I will show the code that I made for the system. I have a blueprint Interface with 2 functions, Heal and Damage. I’m gonna just show the Heal code I have currently instead of just showing both Damage and Heal code since their functions are similar. So for the Blueprint interface Heal function, I have one input and its just the Heal amount and object does.
And next I have the Test healing item, that when interacted with, heals the player. I think its kind of self explanatory what the code is supposed to do.
and next I have a temporary heal system in the player blueprint. Right now I have not made a true death system (just destroying the actor when the health reaches zero.) and a cap for player health, I’m just making a healing and damage systems that show the current health variable number in printed strings. The health variable is an integer by the way.
I know this may seem like reading an entire novel but I really do want to know what I’m doing wrong as I’m still very new to using blueprint interfaces and would like to get a better understanding of them. Thank you for taking the time to read!