Issues with Activating Combat Mode with Line-Tracing
So, I've been working on a system that activates "combat mode", whenever an enemy is within 800 units(?) of the player, and when they are an interface is activated to the enemy blueprint, having a "soft-lock-on" cone above their head. However, I am running this with event tick and I'm not entirely sure how else to run this. Also, I'm having issues with it constantly doing its thing, once it is in combat mode. Below is my blueprint and any help would be greatly appreciated! Also critiques would be great as well!
This is essentially supposed to be like the Kingdom Hearts combat system, where once you enter a certain distance of the enemy, the HUD changes color and new music begins playing. That is essentially what I am trying to go for at least.
CombatEnemyDistance = 800 MinDistanceToCombat = 0
asked May 05 '18 at 09:45 PM in Blueprint Scripting
You shouldn't do this:
because you're accessing a variable that technically doesn't exist, because it comes from what is executed after the branch. Move the cast to before the branch, and you'll be fine.
Not sure if that'll fix your issue, but if it doesn't let me know!
answered May 05 '18 at 09:53 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here