0
Well the solution is really quite simple.
When I asked the question I was wanting there to be a randomization in the direction in which the object was (left/right) after colliding with one another, this can be done with the if.
if (condiction01 == true){
//ir para a direita com a velocidade 10
move_towards_point(object.x+1,y,10);
//valores positivos adicionados a x, o levam para a direita na horizontal
}else{
//ir para a esquerda com a velocidade 10
move_towards_point(object.x-1,y,10);
//valores negativos adicionados a x, o levam para a esquerda na horizontal
}
Remembering that even if the application is "selfie" this indication is necessary object.x (+ ou -) 10
and not only x (+ ou -) 1
to be relative to its position.
The y is the opposite of conventional. With -
goes up and with +
if it goes down.
Where does the image begin? I imagine you thought that in the upper left corner, ready is why. The point 0, 0 (x , y) is in the upper left extreme, so any value down or to the right side increases its value.