[r70] "Is On Floor" doesn't work with Jump-Thru

Bugs will be moved here once resolved.

Post » Mon Nov 28, 2011 4:00 am

First, thanks for adding the jump-thru attribute!

Seems the platform behavior condition "Is On Floor" doesn't work with it though..Unless I'm missing something?

I edited the example .cap so you can check it out. Download hereTokinsom2011-11-28 04:57:45
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Wed Nov 30, 2011 10:52 am

Bump. I just started implementing the jump-thru attribute into my project and weird stuff was happening... Turns out this is why. Hoping for a quick fix soon, I kinda have to have this game (demo) ready by Tuesday...
B
20
S
9
G
6
Posts: 607
Reputation: 6,117

Post » Wed Nov 30, 2011 11:15 am

Will try to get fixed for the next build!
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Wed Nov 30, 2011 12:49 pm

I think you can fix this quite easily yourself for now by editing the runtime.js of the platform behavior a little.

Find the part where it says the following:

     cnds.IsOnFloor = function ()
     {
          // Must be overlapping solid in current position
          if (!this.runtime.testOverlapSolid(this.inst))
               return false;

and change it to:

     cnds.IsOnFloor = function ()
     {
          // Must be overlapping solid in current position
          if (!this.runtime.testOverlapSolid(this.inst) && !this.runtime.testOverlapJumpThru(this.inst))
               return false;

The added part is green.

Tried it in my project and it seems to work fine. I'm not an expert though, so use at your own risk and save a copy of the original runtime.js if you want to try it.
B
23
S
6
G
10
Posts: 1,041
Reputation: 7,553

Post » Wed Nov 30, 2011 5:16 pm

Thanks Ash!

Thanks for your suggestion too, PixelRebirth. This works pretty well but the player now thinks he's on the floor when overlapping the platform at any point, not just on the top.

Like if I'm jumping/falling and overlapping the platform at any point, the running animation will be played instead.

It's close but I think there needs to be another bit of code added somewhere!
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Wed Nov 30, 2011 5:48 pm

[QUOTE]Thanks for your suggestion too, PixelRebirth. This works pretty well but the player now thinks he's on the floor when overlapping the platform at any point, not just on the top.[/QUOTE]

Ah, I figured it might be a glitchy fix. Didn't notice this myself because of my animation events. I changed a few things around and I see what you mean. Too bad, hehe.

Looking forward to seeing this fixed for the next build.
B
23
S
6
G
10
Posts: 1,041
Reputation: 7,553

Post » Thu Dec 08, 2011 6:38 pm

OK, this should be fixed in the next build now.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests