Player collision suddenly is messed up....

For questions about using Classic.

Post » Wed Jan 18, 2012 6:38 pm

I'm a complete novice to this program and have been following the Platform School tutorials so far so build a small demo just to get used to how this program works. Everything was working fine till I got to inserting platforms(that you can jump through). Now my player sprite seems to fall off the right end of all solids and platforms and I can't figure out why. The collision mask seems ideal size and it worked perfectly until I started adding graphics. Anyone able to tell what happened?

CC Demobetamax2012-01-18 18:40:55
B
1
Posts: 2
Reputation: 229

Post » Wed Jan 18, 2012 7:41 pm

I, so far cannot find exactly what is going on. However, the reason the animation is stuttering is because it is not checking the ground properly, probably something to do with the collision mask. Which is probably causing your problems. The jumping and falling animations also do not have collision masks.

http://dl.dropbox.com/u/1487524/Scirra/Problem.cap


What I recommend is that you create a separate collision sprite. Then set the animated character to that sprite with an always condition. You should also change the tiledbackgrounds you use for collisions to sprites.

Give that a go and see if it helps, let me know either way.



B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Wed Jan 18, 2012 7:47 pm

I'm not quite sure I saw what you problem was. The only thing I can think of is that you had the "Down Button" action ticked, which allowed Wario to fall through the platform when you pressed down and jump at the same time.

I edited the .cap just a little. I changed the controls, so now you control an invisible "Player" and have Wario always at his position. The "Player" handles collisions much better, and Wario's animations are not jerky when he moves. I recommend using a "Player" whenever you make another game.

http://dl.dropbox.com/u/56653097/Games/pro%20edit.cap

I'm not really sure I solved your problem, so let me know if you still are experiencing that problem, and I will try to fix it! :)
B
5
Posts: 18
Reputation: 386

Post » Wed Jan 18, 2012 11:46 pm

Thank you both for your help! As Steven said, I probably needed a player collision sprite. That seems to have fixed everything in Awesomeggs cap file. In Steven's the problem still remains though with Wario falling off before reaching the right end of collision objects. Awesomegg's fix also seemed to fix a problem I suddenly had with Wario not being in front of the platform graphics.

The Down Button action was intentional to let Wario be able to jump through the object to the top and be able to jump back down through it ala a Platform School example. When he was falling off only the right end of the collision objects I guess it was because of the collision mask? Hopefully I don't encounter that again as long as I use this player collision sprite. I hadn't yet learned how those work but now I think I got it. Thanks again :)
B
1
Posts: 2
Reputation: 229

Post » Wed Jan 18, 2012 11:52 pm

Your welcome!

We did it Steven.
*gives Steven a high five*
B
5
Posts: 18
Reputation: 386


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests