No, because variables in math you are trying to find their values. But in Computer programing variables are like boxes, because you store things inside them.
When creating a variable, it can either be for all sprites or just one.
A variable can store one value at a time.
No, the code doesn't work. Nothing happens, because they can't switch without having another variable to store the values because a variable can only store one value at a time.
The code's temp variable switched with value 1 and value 1 switched with value 2 and value 2 switched with temp.
Click HERE to return to homepage.