How do I Prevent 2 types of object to be close

0 favourites
  • 5 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hi there

    I'm making a infinite jumper kind of game. I whant to have different types of platforms, some move (whit sine) some not.

    But I want to create this platforms with a certain distance from one another, don't make sense create 2 platforms near in Y dimension, or you have one or another in each space. Thay need to be far from one another to keep the game difficult.

    I tried to use "is overllaping at offset", tried to compare their Y and destroy one of both if is too close, but I don't see why any of it works.

    How would you do it? Simply prevent them to be close. It may be simple... newbie things.

    Really appreciate your time! Thanks.

  • Using the Sine efect will over ride some other events because it is a set pattern of movement.

    You probably need to fiddle with the Sine settings and place your platforms so they don't cross paths if that is the movement you want to use.

    One way is to seperate them by X distance on spawn.

  • I'm creating the platforms exactly the same way from the infinite jump example that comes with C2, that is allways creating the platforms at the Viewport Top, but they have a certain distance set in Y so they don't spawn too close.

    I repeated this with the other type of platform, so now they are beeing created exactly the same way... and close to one another.

    A simple way I fink to solve it is destroying the normal platform if the moving platform is close. The first solution that come in mind is to compare their Y, and if is close destroy one, but it don't work (don't figure why).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As allways thank you very much guys!

    99Instances2Go, it isn't what I was looking for, but you help me to find another way, appreciated

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