How Get Positions

0 favourites
  • 3 posts
  • Friend I am new in Construct.

    I have question .

    if you have 8 separate objects

    ex. Num1, num2.... num8

    I want to get each X,Y positions

    I take array and in event For n = 1:8 Set XY X | n , Y | 1 , Value ???? how write num[n].X or num(2).Y

    thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I believe.. you want to try...

    For Each Object - Set Array Value at (Object.num, 1) to Object.X

                   - Set Array Value at (Object.num, 2) to Object.Y

    Your X values will be in the first row of the array, and your Y values will be in the second. Generally I think you don't want to try to store two values in one cell of an array, it gets unnecessarily messy.

    You can assign each object an num instance variable to keep track of them, or use their IIDs if you don't mind their number changing.

  • Use For Each ?

    when I want to Set Array Value I have Problem .

    maybe I can't understand you .

    <img src="" border="0" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)