Collision - simple platformer game.

For questions about using Classic.

Post » Sun May 11, 2008 4:08 am

Pretty much I need to know how to make the player sprite collide with the ground sprite so he doesn't fall through it. I've put the platform behavior on the player sprite already.

I would also like to know how I can use my animations like:

When it jumps it does the jump animation
Or basic things like my walk animation
and how to make it turn left when I walk left

I'm pretty noob to Construction so you might have to go into some detail,

Thanks! :mrgreen:
B
2
G
4
Posts: 34
Reputation: 1,118

Post » Sun May 11, 2008 2:22 pm

Simply select the ground, and under 'Attributes' in the properties bar, tick 'Solid'. If you go file - new - template and pick Simple Platformer, there's a demo of this in action (but not animations).

Using the animator bar you can add animations and animation frames to a sprite. If you then add the 'Mouse and Keyboard' object, you can add events such as 'On shift pressed - change to jump animation'.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Sun May 11, 2008 10:05 pm

Hey thanks! I'll test this out!



How about when I want my guy to start walking left or right, can I just do some sort of command that mirrors the animation to the left, cause my walking animation is only for the right!

And is there any way to select more then one sprite at once so that i can make rows of ground easier and more equal?

And Is there a way i can make my character sprite be able to do a double jump?
B
2
G
4
Posts: 34
Reputation: 1,118

Post » Mon May 12, 2008 3:12 am

Oh and I don't see any action/command to change the sprite to an animation.

Never mind I got it to work.


Never mind again, I found the command but it is not working.
B
2
G
4
Posts: 34
Reputation: 1,118

Post » Mon May 12, 2008 5:05 am

Please review the end of this thread:
viewtopic.php?f=3&t=909&p=6675#p6675

That may help get you started. If after that you have any further questions, please ask.
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Mon May 12, 2008 10:17 pm

Ok i sort of figured out the angle stuff, but it's not working: Cap file: http://files.filefront.com/Gamecap/;102 ... einfo.html
B
2
G
4
Posts: 34
Reputation: 1,118

Post » Tue May 13, 2008 4:19 am

A couple things to change. For each angle of animation, make them "looping" at a speed of about 10 or so.

Why it's crashing right after the platform movement comes to a stop is eluding me. Ashley? Rich?
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Tue May 13, 2008 4:27 am

Yeah I don't know why It's crashing, Also what annoys me is when I do the "Import frame" (because i can import multiple frames in at once) It doesn't have transparency and makes a blue box around the sprite. So i have to do the add frame, which is annoying cause it's importing one frame at a time.
B
2
G
4
Posts: 34
Reputation: 1,118


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 10 guests