hey there everyone! so i need to know how to change the value of a variable when say an object hits the edge i have tried a couple things but i cannot get it to work. what i am trying to do is once this object reaches an edge it will multiply the value of the variable by -1 ( so if it was a positive it would change to a a negative and then change the variable to a negative one and move it to the left).
i tried something like
im a newbie to this and looking for help so dont just tell me to RTFM
int mv=1;
if(isAtEdge())
{ mv=mv*1 }
move(mv);
