How do I Prevent 2 types of object to be close

Get help using Construct 2

Post » Mon Mar 27, 2017 1:05 pm

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.
B
28
S
14
G
6
Posts: 90
Reputation: 5,487

Post » Mon Mar 27, 2017 1:12 pm

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.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Mon Mar 27, 2017 1:54 pm

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). :|
B
28
S
14
G
6
Posts: 90
Reputation: 5,487

Post » Mon Mar 27, 2017 10:20 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Mar 28, 2017 11:49 am

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 :)
B
28
S
14
G
6
Posts: 90
Reputation: 5,487


Return to How do I....?

Who is online

Users browsing this forum: newt, Yahoo [Bot] and 12 guests