Thank you for playing! I did all the code myself, no plugins, just godot. For the locking I just keep a list of enemies that are within range (using Area2D node) and calculate the closest one