Reseting position of random Objects

0 favourites
  • 1 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • I put some Objects on a Layer within an Array at random position

    And some more at the bottom that are fix

    I want to drag some objects to the one at the bottom

    but if i drop an object in an empty space, i want it to return at the place it was before. choosed by the random

    Can someone help me on that?

    Thank you

    My random placement: took from Random Tile map Tutorial

    Array set value at (array.curX, array.CurY) to floor(random 0,5))

    System Create object Objects on layer 1 at (32 + (array.CurX*64) ,32 + (array.CurY*64))

    Objects set animation frame to array.CurValue

    Quote megatronx Quote Post ReplyReply Direct Link To This Post Posted: Today at 1:48am

    Create Variables ObjectsX and ObjectsY and set them to Objects.X and Objects.Y respectively. Then use those two when moving it back to original position.

    Ah! it workd perfectly thank you

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)