I want to use drawing canvas plugin to draw a line from one instance of a sprite to another one, the canvas plugin requires x1,y1 and x2,y2 to do that, my instances have a variable "for" to store their order number (1,2,3) but i don't know how to do that for two instances of same sprite without creating any additional variables to store x1,y1 and x2,y2.
I tried using
Sprite.for = 1 ? Sprite.x : 0
Sprite.for = 1 ? Sprite.y : 0
Sprite.for = 2 ? Sprite.x : 0
Sprite.for = 2 ? Sprite.y : 0
But it didn't work...