Hi all, I have this code from a tutorial:
var emptySlot : Transform ;
var xtemp;
var ytemp;
function OnMouseUp() {
if (Vector3.Distance(transform.position,emptySlot.position)==0.5)
{
xtemp=transform.position.x;
ytemp=transform.position.y;
transform.position.x=emptySlot.position.x;
transform.position.y=emptySlot.position.y;
emptySlot.position.x=xtemp;
emptySlot.position.y=ytemp;
}
}
It works fine but I'd like to convert it to 100% Playmaker. The first var is a Transform variable - what is the equivalent in Playmaker? What type of variables are var xtemp and ytemp if I was to recreate them in Playmaker? String?
I'm a bit confused, so any help would be great, thanks.