How do I make multiple objects move together?

0 favourites
From the Asset Store
This is a code so you can see the same skin on all screens (peers). Each peer gets a skin, in addition to 4 directions t
  • I probably explained it poorly. The gist is to not check the objects current position for collisions, but the position it’s moving to.

  • I probably explained it poorly. The gist is to not check the objects current position for collisions, but the position it’s moving to.

    No sorry it's me.

    You mean like that?

    I will test if they aren't contradiction

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here's the example using an array.

    dropbox.com/s/1hevbeddf81x3u6/grid_motion_array.capx

    The array has 1 if something is at that grid space and 0 if nothing is there. That's initially setup at the start of layout.

    motion logic is basically this:

    want to move right?
    is right grid position empty?
    -- set current grid position to empty
    -- set right grid position to full
    -- start move

    You then look at the sprites in order as you have with "for each ordered".

  • Here's the example using an array.

    https://www.dropbox.com/s/1hevbeddf81x3u6/grid_motion_array.capx?dl=1

    The array has 1 if something is at that grid space and 0 if nothing is there. That's initially setup at the start of layout.

    motion logic is basically this:

    want to move right?
    is right grid position empty?
    -- set current grid position to empty
    -- set right grid position to full
    -- start move

    You then look at the sprites in order as you have with "for each ordered".

    That's exactly what i want to do.

    Thanks from all my heart :)

  • You’re welcome

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