ue4-targetsystemplugin
ue4-targetsystemplugin copied to clipboard
Function or bool when system is completely off (Target Actor is Toggled off)
Is there a function or bool inside the system to know when the target system is completely toggled off? "On target locked off" fires everytime a target is switched, not when system is off. Same with "is locked".
On component deactivated also never fires. When I am locked on and hit target actor function again, then system "turns off" i need an event or bool for that.
Thanks!
No such bool. But that's something you can track yourself. As you said, both target locked off / on events fires, even when you switch targets. So just setup a bool in your character blueprint with those events that you set to true on lock on, false on lock off.
When you'll switch the boolean will first go false then true as events triggers. When you don't switch or if you're target dies (assuming you're using the interface to make dead targets untargettable), lock off event will fire setting your bool to false, and lock on event won't thus letting your variable to false.
On component deactivated also never fires.
This event has nothing to do with the API exposed by the plugin, it's part of unreal events for actor components related to their lifecyle.