How do match the values from 2 arrays and create the sprites.?

0 favourites
  • 2 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • So I've got 2 arrays, one is storing all of the coordinates and the other one is storing IID's of all sprites(it is a 4x4 sprites grid). How can I match the index of the first array to the IID's stored in the second. Also, how can I create the sprite if the conditions meet as the create option requires the X and Y axes and I need to create the sprites if the index and the IID are equal(index and co-ordinates are stored in the 1st array)? Like if the condition matches, the sprite will be spawned on the co-ordinates

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You don't create a sprite by IID so not sure what you are trying to achieve with that ? In general though if you are picking from the array you find the row of the relevant object in the array then if for example the row is 3, and the co-ords of the object are stored in columns 1 and 2 you would create the object at (array.at(3,1), array.at(3,2). Also to note you can just store all this data in one array.

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