Issues with player character, advice please? ^^

Get help using Construct 2

Post » Fri Mar 01, 2013 5:00 pm

Hello everyone!
Firstly here is my capx file! https://docs.google.com/file/d/0B-d_Lj_9qX8IWXBnSjY4c25WeWM/edit?usp=sharing

I apologise if I'm asking something which gets asked a lot, I looked but couldn't find an answer. Thanks so much to anyone who takes the time to read this! ^^

So far in the game the idea is that the cherry moves (with arrow keys) to the umbrella and picks up the cocktail umbrella. At this point the animation of the cherry changes to 'cherry with an umbrella'. If you press 'shift' then the picture again changes to the cherry jabbing the umbrella.
There's also a floor below.

You can click the logo top left to go to the menu and restart the game. (Note: the other buttons don't work yet.)

BTW sorry I know this sounds like the weirdest game known to man, if you open the file it will make more sense LOL!

I have two problems really here though.

1. When the cherry goes on the floor (the kitchen surface), it's partially obscured by it, ie. it's not on top of it properly. (You'll see if you run the game). But for some reason one of the 3 animations (the jab) it IS sitting on top of the counter properly.

2. Even though I made all the pictures exactly the same size and same position within the picture, when pressing shift the cherry jumps backwards. I wanted it so that the cherry itself would be unmoved by this action, but the umbrella would jab out. (If you want to see how, look at the frames 1 and 2 in quick succession in the animation panel.)

I've tried replacing the pictures with new ones and I really don't know what's wrong! Also I'm not sure why my platform is not acting as a platform exactly.

Thanks anyway I hope someone will be able to advise! Many apologies again if it turns out to be highly obvious!

B
2
Posts: 1
Reputation: 352

Post » Fri Mar 01, 2013 5:17 pm

When you edit the animations of your Sprite2 object (please name your objects more descriptively!), click on the icon at the very bottom of the left hand toolbar that say "Set Collision Polygon".

Now scroll through the animation frames - notice how the collision polygon varies in each one? It's this polygon that is used to determine whether the cherry has collided with another object or not, and whether it should be stopped. Change the position of the vertices of the polygon to create a tight fit around the cherry that's consistent in every frame and try again.tanoshimi2013-03-01 17:19:55
B
8
S
2
G
3
Posts: 83
Reputation: 2,668

Post » Fri Mar 01, 2013 5:19 pm

Open up your animation editor, and set your origin point on each frame to the bottom center of the cherry itself. Then correct the collision polygon around your cherry, or better yet, use the Platform tutorial version of an invisible platform bounding sprite, and a pinned art sprite!

The origin is the crosshair icon on the bottom left of the sprite editor.
The poly editor is right below that icon.

Good luck!

B
6
S
1
G
1
Posts: 70
Reputation: 702


Return to How do I....?

Who is online

Users browsing this forum: Lof, YoHoho and 23 guests