Collision doesn't always work

Just started using Construct 2? Post your questions here

Post » Mon May 26, 2014 8:50 pm

Message: Sagolika is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Hello everyone,

I'm new to this forum and to making games with Construct 2, so let me apologize first for when this topic is in the wrong place.

I have made a simple platform game for my boyfriend and I've got everything in working order so far. I want the game to end when Mario (yeah, we like Super Mario) hits the star, but sometimes this collision doesn't always work.

The conditions stay the same, but sometimes I'm able to hit the star and end the game and sometimes I'm not. I just can't figure out what's going wrong there.

Please, if someone could take a look at and help me out. I'd really appreciate the help. (Other tips are welcome too, but please bare in mind that I'm still working on it and that the game is only for me and my boyfriend, so it could look a little bit lame, I guess.)
B
4
Posts: 6
Reputation: 212

Post » Mon May 26, 2014 9:37 pm

You should be able to attach a .capx as you don't have enough rep to post links yet.

One thing to check is the collision polygons.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,490
Reputation: 60,266

Post » Mon May 26, 2014 9:41 pm

You can upload files but can't post links.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Tue May 27, 2014 9:10 am

Thanks guys, I think I've uploaded it now?

It's the first game I've made, so I can imagine if I have done some things the wrong way. But it's about the star at the end.

Well, the collision polygon solved another thing I didn't really know how to fix, but the collision problem still appears.
You do not have the required permissions to view the files attached to this post.
B
4
Posts: 6
Reputation: 212

Post » Tue May 27, 2014 12:37 pm

I don't see any problem, every time i collide with the star correctly.
To be more sure, make the star collision polygon as square.

And you don't need 3 different layout's to show messages and buttons.
Easily make 3 groups and make it deactivate and invisible, one for restart the game and one for you win... etc.
And when you want to show the message set it to visible and activate.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Tue May 27, 2014 2:16 pm

Thanks for trying!

I've made a square from the collision polygon, but it still appears sometimes, mostly when I've got Yoshi. I've made a screencap. I have tried setting one of them in front of the other, but that seems to have no effect either.

I found out about the layout thing you explained, after I made it, so I decided to leave it the way I made it.
You do not have the required permissions to view the files attached to this post.
B
4
Posts: 6
Reputation: 212

Post » Tue May 27, 2014 9:23 pm

I hope I'm not being to impatient, but is there someone who was able to recreate the same problem as me and who'll know a solution?
B
4
Posts: 6
Reputation: 212

Post » Tue May 27, 2014 9:37 pm

You only have star collision conditions for when Up <= 0 or Up > 1. What about when Up == 1?
In other words, if you miss one mushroom then Up will equal 1 and colliding with the star won't do anything.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,670

Post » Tue May 27, 2014 9:41 pm

Oh, you're totally right! It was that simple. I completely overlooked that. Thank you so much! I've fixed it. And now I can only hope my boyfriend will like this as a birthday present.
B
4
Posts: 6
Reputation: 212


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest