Collision objects player

Get help using Construct 2

Post » Thu Nov 19, 2015 6:49 pm

Hi everyone, I have a little doubt, that is driving me crazy.

Colisone need an object with another exactly the same point Y.
Using this formula.

Enemy Set 8 Direction vector Y to Hero.Y-Enemy.Y

But not always work, he stays at his side without touching.
Any ideas?

And sorry for my English :) I am Spanish.
B
16
S
4
Posts: 26
Reputation: 1,004

Post » Thu Nov 19, 2015 6:57 pm

I'm not sure what you are trying to do..
What has the vector-y to do with the collision event?

Setting vector Y is setting the speed in pixels per second for the y direction..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Nov 19, 2015 7:03 pm

If I understand correctly your collision-event only triggers when the y-position is exactly the same..
If you set a text-object to the y-position of the objects, you will probaly see it is never exactly the same..

The 8direction enemy probably even never stops moving (although it might look that way).
You could create an event with an action to set the y-position to the exact y when the difference is very small..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Nov 20, 2015 1:47 am

It is a beat up game, simulate 3D using 3 different layers. In order to change layer, the enemy needs to get to a position of the Y axis, but sometimes it is at the limit and can not hit the hero.

Image
B
16
S
4
Posts: 26
Reputation: 1,004

Post » Fri Nov 20, 2015 12:36 pm

Did my previous answer help?
If not, could you share your capx and/or events so we can have better understanding?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Nov 20, 2015 4:13 pm

I still do not understand what you want to do.
B
26
S
9
G
3
Posts: 251
Reputation: 4,052

Post » Fri Nov 20, 2015 11:39 pm

So yeah, I keep changing layers for 3D effect, and for collisions use the proximity of the exer Y. I'm still experimenting with this.
Thank you very much, I will keep you informed;)
B
16
S
4
Posts: 26
Reputation: 1,004

Post » Fri Nov 20, 2015 11:51 pm

Ok, seems like you are maybe overcomplicating things..

Good luck!
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: AllanR, LaurenceBedford, TRPaladin and 13 guests