Grid movement for multiple objects

This forum is currently in read-only mode.
From the Asset Store
Snap to visible grid - perfect solution for any game genre
  • <img src="http://img29.imageshack.us/img29/4374/sheesh.jpg">

    When i create multiple objects of the same type and make them solid.

    How can i move them all in the same time. Even the one that are blocked (one on the right) when the left block has some space to move.

    The pics show how it should work when we press one of the direcional buttons shown over the picture.

    Can anyone solve this ? I'm pretty sure there is a way. Maybe with a loop or something.

    Oh and an additional question : how to stop the music (ogg) so it doesn't show an error when i close the game?

  • this is simple to do. I made a cap to show you.

    http://download319.mediafire.com/3zint3 ... bjects.cap

  • thanks for the cap, but there is one thing , the objects we move cant overlap themselfs, they have to be also solid. And when there is no space they just stay in the same position without moving on each other.

    I have tried to make it and come to exactly the same result as in your cap.

    But anyway thanks and sorry for the trouble.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can anyone solve this ? I'm pretty sure there is a way. Maybe with a loop or something.

    I have a solution. But I'm afraid it's very complicated compared to just activate grid movement behavior. On the other hand, my solution doesn't make use of that behavior at all, so you're much more flexible in changing every little bit of it. But be warned, I make use of functions, alias calling, loops and such. I'm nearly sure, there might be an easier way. But hey, it works

    http://www.mediafire.com/file/znonwyxim3y/Grid%20Movement%20Alternative.cap

    Hope it helps! (I know it's not well documented)

  • > Can anyone solve this ? I'm pretty sure there is a way. Maybe with a loop or something.

    >

    I have a solution. But I'm afraid it's very complicated compared to just activate grid movement behavior. On the other hand, my solution doesn't make use of that behavior at all, so you're much more flexible in changing every little bit of it. But be warned, I make use of functions, alias calling, loops and such. I'm nearly sure, there might be an easier way. But hey, it works

    http://www.mediafire.com/file/znonwyxim3y/Grid%20Movement%20Alternative.cap

    Hope it helps! (I know it's not well documented)

    Wow Tulamide there is some advance stuff you got right there. It took me all day to understand most of your work. good work. this helped me out a lot with the array and function objects, so thank you.

  • Sorry for the late answer : ) It works !

    but i will need some time to understand how its done ; P

    P.S.if i'll use it somehow you will be in the credits

  • You're both welcome

    And in case of any questions left, don't hesitate to ask or pm. You shouldn't suffer from me being too lazy to document it

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