To constrain an (invisible helper scroll-to) object position to a radius around an origin point (player) based on the mouse position, first set the object position to the player, then use move at angle to move it towards the mouse position (angle(player.x,player.y,mouse.x,mouse.y)). The distance will be the distance to the mouse or the max distance, whichever is smaller, by using the min() expression.