Fall through Platforms

Get help using Construct 2

Post » Sat Jan 14, 2012 5:38 pm

If the player stand in a platform that have the jump through behavior
and the down arrow and the jump button are pressed together, the character should fall through the platform

I know it's an old question but every kind of reply I've looked was about CC and not C2 and something is different in C2, so I can't find the functions for this task >.<
B
5
G
1
Posts: 32
Reputation: 939

Post » Sat Jan 14, 2012 5:46 pm

Why do you think the character should fall down?

That was the case in CC, but that functionality hasn't been implemented in C2 as far as I'm aware.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,844
Reputation: 48,289

Post » Sat Jan 14, 2012 5:52 pm

it's not that I think it should fall, it's what I'm trying to achieve xD

so I looked around in the forum but this answer is only about CC
so I was wondering how to make it with C2, that's all :)
B
5
G
1
Posts: 32
Reputation: 939

Post » Sat Jan 14, 2012 5:52 pm

You could do a little trick(Not sure if this will work)

But clone the sprite you wish to fall through on, remove all behaviours from it, And then when you need to fall through the platform set the x and y to another location, and spawn the sprite, Then once fallen through the sprite place the platform back where it was and destroy the sprite..

You'll have to play around with instance variables to do this.

Let me know if you need some help, Send me a capx and i'll help you,
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Sat Jan 14, 2012 6:14 pm

The Jumpthru behavior can be enabled or disabled, so you could check for the player overlapping a jumpthru platform and also check for down key being pressed and jump key, and if all 3 conditions are met then disable the jumpthru behavior. Toggle it enabled straight afterwards. That might work until Ashley can build the fall-through behavior.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,844
Reputation: 48,289

Post » Sat Jan 14, 2012 6:34 pm

@ zenox98

It works but partially, since even if the Jumpthru platform has it's behavior disabled with the three conditions checked, the character remain on it without falling through it, and if you move left or right nothing happen, but if you jump then on the fall (after the jump) the character will go through the platform with the disabled behaviour


@ smitchell

well, I'm new to C2 so I don't really know how to put the new spawned platform on the same position of the moved one >,<
B
5
G
1
Posts: 32
Reputation: 939

Post » Sat Jan 14, 2012 6:38 pm

Ok, Publically post your capx or send it to me in a private message and i'll fix it for you.
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Sat Jan 14, 2012 6:54 pm

maybe its not really overlapping when you press down and jump?
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Sat Jan 14, 2012 7:55 pm

this is the capx >,<


http://dl.dropbox.com/u/57262275/01.capx
B
5
G
1
Posts: 32
Reputation: 939

Post » Sat Jan 14, 2012 8:09 pm

Here ya go: http://dl.dropbox.com/u/51270524/jumpThroughFixed.capx

Its not 100% perfect but it will do, It takes a couple milliseconds to kick in but it works no need to press the jump button again.

Honestly its probably better it takes a few milliseconds, It gives the player some time to jump if its falling..

B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Next

Return to How do I....?

Who is online

Users browsing this forum: armaldio, blackhornet, makkancs, TiagoCesar and 17 guests