Copy actor while Drag and Drop movement

IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
edited November -1 in Working with GS (Mac)
Hello, waiting for new GS update, I try to improve my game, and I have one little problem:

I have an actor with drag and drop movment (from tutorial in GS wiki), and it's working fine. But I want make something like that:
When player touch and move this actor, then in the original place where this actor was, the same actor appears (it creates a copy of this actor).
It is quite easy when you are using prototypes. But I use only instances.

Thank you very much for any advice.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Without spawning prototypes you will have to have extra instances waiting off screen and move them to the spot. I would have three attributes - game.spotX , game.spotY, and game.instanceNumber (all would be integers). In the dragged actor I would have a rule that says when touched change spotX and spotY to selfX and selfY. Also change instanceNumber to instanceNumber+1. In the offscreen instances have rule that says when instanceNumber = ???? change selfX to spotX and selfY to spotY
  • IsabelleKIsabelleK Member, Sous Chef Posts: 2,807
    Thank you very much scitunes!
Sign In or Register to comment.