While the player is holding a blueprint entity selection is neither updated (read), nor updatable (write) and LuaControl.update_selected_entity(position) has no effect. I need to know which entity would theoretically be selected if the player wasn't holding a blueprint during a custom-input event.
Possible solutions:
Things that I think could solve my problem, in preferred order.
1) A new method that simply gets the entity. I.e. LuaControl.get_selectable_entity(position).
2) A parameter to make update_selected_entity work even while holding a blueprint. Something like:
Code: Select all
function get_selectable_entity(player, pos)
player.update_selected_entity(pos, {enforce = true})
return player.selected end