Hi all,
I've got a quick one here.
A while ago i made a system where it checks if a objects position is close to a global variable. Now i want to write all in one line.
What i want:
1. On drop
2. Check if x and y position is close to Global Variable 1(x) and Global Variable 2(y)
3. If yes do actions.
What i did previously to check if is it close to my global variables is:
[Compare two variables] : abs(Objectname.X-p1X) Less than 22
[Compare two variables] : abs(Objectname.Y-p1Y) Less than 22
p1X and p1Y are global variables where i will move it to when you dragged it close enough. These are global variables i put in before so thats alright.
In short.
I want: On drop (drag and drop function) that Objectname.X AND Objectname.Y is within 22 pixels of p1x and p1y ( global variables ) it does my actions. If not there is nothing to do.
All that in one line if possible?
I hope i made myself clear.
Thanks in advance!