I’ve refined it, but it’s still not logically correct because it just keeps updating temp and temp2, thus it will always be the ‘else’ statement because they’re both equal to each other. What I’m trying to do here logically is when the user moves the icon, the temp and temp2 variables will remain initial where at if statement, it will check its current position on that frame and compare it to the temp/temp2. If they’re different, that means it moved and if it moved, it has to go transparent.
temp = thisLayer.position[0];
temp2 = thisLayer.position[1];
if(temp[0] != transform.position[0] && temp2[0] != transform.position[1])
{
transform.opacity = 30;
}
else
{
transform.opacity = 90;
}