How do I summon and specify a specific piece by name?

I have an object with many drawings
How do I summon and specify a specific piece by name ?

for the POS (X,Y)

image

@E1e5en
446

22
An error appears ??

not scene variable, but animation.

set animation of obj_puzzle_piece to to p0_1

  • First, to get the X value from an object, you need to write: obj_puzzle_piece.X().
  • Secondly, switching animation does not affect the position of the object in any way (it is just changing the picture for display). Therefore, obj_puzzle_piece.X() is also used to get the position.
  • Thirdly, if you want to change the image on the object, then use the function Change the animation or Change the animation (by name):