How do I Dynamically move items/sprites.

0 favourites
  • 2 posts
From the Asset Store
Move Block
$10 USD
Captivating puzzle game. With challenging gameplay, this game will keep you very engaged.
  • Hi there

    I was sure how to put this in a subject.

    but how can i move objects/sprites dynamically..

    what i mean is if i have 4 items side by side. and i delete one of them, is there a easy way to make all the items move together to fill in the gap with little or no code??

    With normal programming (visual studio) there like panels there that you can put items side by side in and if one of them is removed the other items would fill in the gab by coming together.

    is there anything similar in Construct or a plugin?

    hope you can help.

    regards

    Jeremy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't know about a plugin, but it's easy enough to do by just checking for overlaps. Do you want your objects to shuffle left, right, up, down, or just towards the centre? Either way, use detect overlap at offset in the direction you want everything to move. If it doesn't overlap another object, move it. Shouldn't be more than a line or two - I've used this for simple inventory management stuff before - provided you're not doing it on thousands of objects at once in tiny increments you should be alright.

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