Best way to pass values?
So, in my game at the moment, the main character has health and shields, the enemy has health, and the projectiles call Idamageable (which causes the health of said enemies to go down).
While this all works, in my game I want the projectile to say how much damage to deal to the enemy it hits. Im still pretty new, and I thought an interface call would work, but the only thing I can do is say I hit the enemy, but I can't pass a value of how much.
How should I pass a damage value? I don't want to have to cast to the main character and set the value of his health and shields within the projectile blueprint, I'd rather just say how much damage to deal.
asked Sep 20 '15 at 08:37 PM in Blueprint Scripting
In your EnemyCharacter you could create a function (Left of the screen). In this function you can add new inputs by clicking the function box. You then call this function in your FirstPersonProjectile the same way you called IDamageable.
answered Sep 21 '15 at 12:15 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here