Sliding after landing

Get help using Construct 2

Post » Sun Jul 22, 2012 1:44 am

No problem

You can right click and choose "add comment", or use the hotkey "Q". You can find all you need to know about the event sheet features in the manual.

You should check your animation's collision polygon in the image and animations editor and see that it's correcly set up. (Edit: But I guess you found out before I answered) Nimtrix2012-07-22 01:45:41
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jul 22, 2012 2:11 am

Thanks AGAIN Nimtrix :)

I have a problem with the crouch animation, it doesn't loop with your system. It's blocked on the first frame.
I'm using "down arrow is down" and "set animation from beginning".
B
6
Posts: 34
Reputation: 643

Post » Sun Jul 22, 2012 2:22 am

Hmm, I tested and it should work if you set it up like in the example. Make sure the animation speed isn't set to 0.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jul 22, 2012 3:59 am

Hey,
Here's the capx, that's where I am.
http://www.filedropper.com/platformertest01

You can notice that the crouch isn't animated.
Same for the shoot animation.

Also I'd like to know how to set up easily the spawn point of the shoot FX, I had to move the origin point blindly until I find the correct spot, kinda lame...

Next step: finding a way to actually shoot using physics...Stampedo2012-07-22 04:00:32
B
6
Posts: 34
Reputation: 643

Post » Sun Jul 22, 2012 4:56 am

In my example there's a boolean so you're able to add the "Is crouching" condition.

Here you go, changed some things:
StampedoGame.capx (r95)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jul 22, 2012 1:20 pm

Wow this is much cleaner and it works perfectly, thank you greatly.

Now I'm interested in a few explanations:
1)What's the advantage of using booleans here?
2)Is there a way to place correctly and easily the origin points? (shoot_fx) for example. I had to place this one blindly...
3)In the "shooting" section, you used the function "spawn sprite on layer 0 (image point 1), I need an explanation for this :)

Really sorry again about flooding with questions, but despite me looking at the manual, many informations don't look naturally obvious to me. I have no experience in game making, this doesn't help.Stampedo2012-07-22 13:25:39
B
6
Posts: 34
Reputation: 643

Post » Sun Jul 22, 2012 2:01 pm

1) Booleans are variables that can be either true or false. I made two instance booleans in the player object to keep track of whether or not the player is crouching or shooting.

As you know, the platform behaviour keeps track of jumping, moving and falling. By adding these booleans you can do additional checks to make sure the character is not crouching or shooting when you want to apply the other animations (standing, jumping etc..)

2) I'm not sure what you mean exactly. The gun's image point is at the tip of gun, the origin of the effect is then put to the left so that it spawns with the back part right where the gun image point is.

3) I used the "Spawn another object" action on the "PlayerImages" sprite. This allows you to create an object at another sprites image point. Since we have image points at the gun we want the "PlayerImages" object to spawn an effect at image point 1. You can also select which layer, but we only had one.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jul 22, 2012 3:15 pm

hmm i didn't read the whole posts but see this tutorial to fix that:
http://www.scirra.com/tutorials/351/platform-behaviors-animation
in this way you can see where the bug when you writing the texts also in my newest game i have used all my animations with this (while umbrella,jetpack,normal) and i can add more just with changing variables
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Sun Jul 22, 2012 7:33 pm

Im using r95, your file doesn't work for me :(
B
6
Posts: 34
Reputation: 643

Post » Wed Dec 26, 2012 2:17 pm

Well I read the post, and I have the same problem as described.

When jumping with up and left pressed when you then land on a platform in some cases the character keeps sliding to the left.
Until it hits the wall. It has nothing to do with animation because if I just use my playerbox sprite it also happens.

In both capx examples posted in this post I had the same behaviour.. still looking for a solution... :(

Regards,

Rob
B
20
S
6
G
3
Posts: 18
Reputation: 5,103

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: austinblackbelt, Yahoo [Bot] and 20 guests