How do I - Have colliding objects slowly move away

0 favourites
  • 3 posts
From the Asset Store
Move Block
$10 USD
Captivating puzzle game. With challenging gameplay, this game will keep you very engaged.
  • I want to spawn a few objects, lets say 3, on a certain location.

    I then want these objects to slowly give each other space between them.

    I tried using "if object is overlapping object, set object X to old.X, Object Y to old.Y, but this just made them never overlap and they just jut away.

    I understand I want to somehow make them move away at 1 pixel or so, and away from each other, I just don't understand how I would input this into an action.

    I can use "move at angle" , but I don't know what I would input to express "Away from overlapping object"

    I think I need to use Pick Nth instance on if overlapping, but how do I write sprite.x, sprite.y, - sprite,x, sprite.y if they are the same sprite?

    is there something like (sprite.x, sprite.y)Nth 1 - (sprite.x, sprite.y)Nth 2 ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Heres what I have, I don't know how exactly I "rotate away from" an object.

    https://www.dropbox.com/s/2dzufnutmsiy5 ... .capx?dl=0

    I wonder how people shorten URLs in posts to simple words...

  • If anyone could point me to a tutorial that does such a thing, I would be greatly appreciative.

    I understand how to move towards an object, but I don't understand what I would need to add as an action to tell said object to

    Face towards object, then face directly away from it and shuffle away.

    I have sprite - Set angle to sprite, but what expression allows me to face AWAY from it?

    "I think I need to use Pick Nth instance on if overlapping, but how do I write sprite.x, sprite.y, - sprite,x, sprite.y if they are the same sprite?

    is there something like (sprite.x, sprite.y)Nth 1 - (sprite.x, sprite.y)Nth 2 ?" <---- Still curious about this too.

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