As above
Is it possible to pick object instances based on an instance variable directly within an expression?
For example
If I have 5 point sprites P, each with an instance variable “ID” = (A) to (E) .
And I want to draw a line between only 2 of the points, say P(ID=B) and P(ID=E).
Then is there any way to pick them directly in an expression?
Specifically thinking, passing function parameters in a function call?
eg in semi-psudocode.... just calling a function passing the X and Y values of P(ID(B)) and P(ID(E))
On button click - call function (“drawlinebetween”) (Parameter(0)= Sprite P(with instance variable (“ID”=B).X), Parameter(1)= Sprite P(with instance variable (“ID”=B).Y), Parameter(2) = Sprite P(with instance variable (“ID”=(E).X, Parameter(2) = Sprite P(with instance variable (“ID”=(E).Y ).
On function “drawlinebetween” - [draw line between points XY1 and XY2] (function.Para(0) , function.Para(1), function.Para(2), function.Para(3) )
?cheers?