Magistross's Recent Forum Activity

  • Sub-events are executed once every iteration, isn't it what you want ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nested loops ! You need to scan every target for every tower.

  • Have the loop condition as a "master" event, and then add as much sub-events as you need, with each its own set of conditions and actions.

  • Are you totaly sure about this ?

    eah, in the end it all comes down to the number of elements in the array. A 10x10x2 3d array is pretty much the same as a 100x2 2d array in term of memory allocation.

  • If you want the array to be a virtual representation of the grid, going the vector way is definitely not the way to go. Going 3d is more intuitive and human readable, and take as much as memory space.

    However, I don't think he needs any kind of array representation of anything. Normally, you would build a grid or map using the info you've got stored in the array, not the other way around.

  • One way would be doing arithmetics with the pixel coordinates to transform them into array "coordinates".

    ("PixelX of tile" - "Grid Xoffset from (0,0)") / "tile width" = x index

    ("PixelY of tile" - "Grid Yoffset from (0,0)") / "tile height" = y index

    Or you could go the simple way and add instance variables to the tile, one for each index, and fetch data from the array using these.

  • The best for storing two (or more) variables of a grid of instances would be a 3-dimensional array with the x,y (width and height) indexes the coordinates of an instance and the remaining dimension (depth) would be use to store each variable.

    However, if you plan on storing the positions in the array, I think it's pointless, since you can retrieve the values directly with the instances anyway.

  • What exactly are you storing inside the array ?

  • Are you looking for something like this ?

    I create 100 tiles with a simple repeat and then order them in a 10x10 grid layout using 3 different (but similar) ways.

  • Did you mean the actual Construct 2 software or did you run a C2 game in Safari or something ?

  • That's weird, the page for the r47.2 release has the following download link on my end : http://www.scirra.com/downloads/construct2/construct2-r47-2-setup.exe

    Your direct link works just fine though !

    edit : It's fine now, I erased all my cache. The site was behaving very strangely too, don't know why the files weren't getting updated correctly in the cache...

  • How does the pairing works ? If you just set up an event with "Set object1 position to (object2.X, object2.Y)", every instance of object1 and object2 are going share the same position in pairs ? What happens if the count of object1 and object2 are not the same ?

    Maybe if I could check the capx it would help, but like I said, the download link for C2 seems down !

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies