Quantcast LoTROInterface - View Single Post - That pesky EntityControl! May I please get some guidance?
View Single Post
Unread 06-14-2018, 11:30 PM
Grimmerthan Grimmerthan is offline
The Indomitable
Interface Author - Click to view interfaces
Join Date: Aug 2014
Posts: 11
Ok, I isolated the behaviour and stripped it down to one line of code.

The EntityControl will maintain a target as expected, if :GetTarget() is called again, prior to LocalPlayer changing target.

The EntityControl loses the connection to the target the next time LocalPlayer changes target, with this call order:
        local Target = LocalUser:GetTarget()
        self.TargetSelection:SetEntity( Target )
It will maintain a connection, when this is done:
        self.TargetSelection:SetEntity( LocalUser:GetTarget() )
        local Target = LocalUser:GetTarget()

Last edited by Grimmerthan : 06-15-2018 at 09:13 AM.
Reply With Quote