Why it doesn't work ? Basic health system
Hello everyone, I have a problem with my blueprint scripting. I starting on UE4 and I have created a basic health system who does'nt work.
My game is a tower defense, I have a turret who fire on the ennemi who enter it trigger. The blueprint of the projectile contains a variable called "Damage" with the value 1.
And now there is the blueprint of the ennemi (called Mob). The variable current health contains the value 3. I don't understand what I do wrong. Thanks you for reading this far !
You haven't actually hooked anything up to the "Hit" event. Hook up the "actor" pin of the "Hit" event to the "cast to projectile BP", get rid of the "get all actors of class", then it should work. Right now that will not execute anything, if you print a string right after the Hit event you will see it doesn't execute because you haven't specified what "Hit" what.
answered Feb 27 '18 at 11:16 PM
Nebula Games Inc
This might be wrong as I am new to Unreal 4, but you haven't set a target for the destroy actor at the end of the graph. Maybe set it to the Projectile BP
Let me know the problem in greater detail (ie the actual output compared to the expected outcome) and I may be able to help more.
answered Feb 27 '18 at 09:49 PM
Thanks you two for your answer. Nebula you are right it so obvious now !
answered Mar 01 '18 at 01:30 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here