How do I make a object correspond with data in array?

  • Hi,

    I am trying to figure out a formula, and I need your help. I have an array that differes in dimensions, and a fixed size layout, with an object in the middle being a spawn. Inside array I randomly choosing position of Start cell. I'm trying to figure out a way to generate level from that array, but where the Start cell corresponds to that sprite object in the middle of the layout. Could you guys help me figuring out the formula? Cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is not enough information. Since you mentioned

    [quote:2boxnoh7]generate level from that array

    How about you tell us first what kind of game you are trying to make? What kind of fabulous experience are you trying to craft? Or else, we might not be able to help you validly.

    But on the primitive level, you could store number or text in the array and then refer to these values to create certain specific objects when you wanna generate the level. You have to define all these yourself. I don't think there is a much of a formula you can look for.

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