Automate slide animation

Get help using Construct 2

Post » Thu Sep 26, 2013 7:20 pm

Hi guys,
This is my first post here, so please dont be angry if this has been asked before :)
How can i make a character automatically play a slide animation when the ground is no longer horizontal ? And how would i make it normal again ?

I have included an example pic for you.
Thank you.

B
5
Posts: 12
Reputation: 299

Post » Thu Sep 26, 2013 10:17 pm

Assuming you are using two different objects for flat floor and angled floor...
When Player is On Floor (Cond: Floor is flat) > Play animation Normal
When Player is On Floor (Cond: Floor is angled) > Play animation Slide
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

Post » Fri Sep 27, 2013 12:25 am

Hi Plinkie,
Thank you very much for helping me out. I will try and implement that and see how it goes
B
5
Posts: 12
Reputation: 299

Post » Fri Sep 27, 2013 6:27 am

where do I find the "Floor is Flat" and "Floor is Angled" Condition?
B
11
S
2
G
2
Posts: 62
Reputation: 2,153

Post » Fri Sep 27, 2013 4:40 pm

These are not pre-existant conditions. When you create your floor objects, create an instanve variable that defines the type of floor it is (flat or angled). Then in your consition, look at that instance variable to determine the type of floor.
B
14
S
6
G
1
Posts: 143
Reputation: 1,800

Post » Fri Sep 27, 2013 4:48 pm

@Dzaky Alkaff
By that I meant When Player Is On Floor(Player is colliding with flat floor object)
If you don't plan to use multiple floor objects you can use variables to determine the angle that the floor is at, therefore floor is flat=0degrees so When Player Is On Floor(FloorAngle=0)plinkie2013-09-27 16:49:35
B
47
S
17
G
81
Posts: 2,223
Reputation: 48,093

Post » Wed Oct 02, 2013 9:26 pm

Sorry to be a bother but im getting confused with Instance variables. Im not sure if it should be a boolean or a number and how an animation is attached to that ?
Would it be ok if you showed me a basic example ?
Thank you :)
B
5
Posts: 12
Reputation: 299

Post » Wed Oct 02, 2013 9:55 pm

I managed to get something kind of working using "On collision with"
but i cant get the animation to play on an angle to match the surface and then go back to normal again. This is a little tricky for a newbie !
B
5
Posts: 12
Reputation: 299

Post » Thu Oct 03, 2013 9:59 am

@Jeepers Creepers just a humble advice: if you are not already doing so, use a rather small, invisible rectangle sprite for all your character interactions, such as collision checks, arranging angle etc. Then pin your animations sprites on top of it. This way it's easier to arrangle angles, do stuff, and prevent some jittery animation/collision bugs. A good idea is to place the origin point of the rectange to bottom mid. Thera re nice tutorials from reddit university on youtube where this is explained thorougly. And please forgive if you are already doing all these :)
B
18
S
4
G
1
Posts: 332
Reputation: 3,149

Post » Fri Oct 04, 2013 10:22 pm

@Windwalker, Thank you for giving me this information. I will do exactly as you suggest and hopefully will get a working solution
B
5
Posts: 12
Reputation: 299

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 41 guests