Collision and Y Compare Problem

For questions about using Classic.

Post » Thu Jan 06, 2011 3:33 am

I'm using Deadeye's method from his Platform School to test whether the player is above an enemy when jumping on said enemy. However, for whatever reason, sometimes it doesn't think the player is above the enemy and subsequently kills the player. I've put together a .cap which demonstrates this. It seems quite random and you may have to do it a bunch of times to get yourself killed (it varies a lot), but it definitely keeps happening for me.

Strangely enough, I was even able to consistently do it immediately after the preview started every first time I'd jump on the enemy, though now I can't seem to do that all the time anymore.

One other unusual thing I just noticed while writing this: If I move horizontally just a tiny bit right as I'm about to collide with the enemy, it seems to kill me as well. I'm really wondering what's going on.

[url:3n2rcvv2]http://www.box.net/shared/j7cajvryk1[/url:3n2rcvv2]
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Thu Jan 06, 2011 4:17 am

I think its a frame rate issue, changing the collisions to box will help.
Using overlapping at offset would be better.
+ Sprite: overlaps Sprite2 : offset (0,5)
-> System: Add 1 to global variable 'Killed Enemy'
-> Sprite: Set position to 500, 150
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Fri Jan 07, 2011 12:43 am

That seems to solve it. Thanks.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests