Pages: 1 [2]
  Print  
Author Topic: Fixing That Stupid Long Fall Glitch (for reals, this time!)  (Read 1064 times)
marsgreekgod
Big Bossy
Mossy
*
Posts: 9773


The will of the Galaxy.


View Profile WWW Email
« Reply #15 on: March 07, 2010, 09:26:13 PM »

you know this is in the game make help thread right? the answer to this? I said it before..
Logged

Show your power, Gun Del Hell! Show them their fate! Yes! Yes! Yes! Yes! Yes! Here we go! Let's go, go, go, go, Django! Light and Dark! It comes down to this! Be afraid, Sun!
gummybears123
Mossy
*
Posts: 5776


Yummy Gummy!


View Profile
« Reply #16 on: March 07, 2010, 09:44:20 PM »

Did you guys know when you shoot a damsel with a BOMB arrow, the damsel takes damage and the arrow AND BOMB dissappear?
QUOTE FROM ME

That?  Or what the topic is about?
Logged

I made a rap.
It sounds dumb, like reading a map
I really should stop this thing before it goes too far
But I don't really car as long as I stay below the radar
Those big companies won't get me no
I'll get away before the fuzz show

-Most famous rapper of Mossmouth
Kirbylord
halibabica
Bossy
Mossy
*
Posts: 1921


*whipcrack*


View Profile WWW Email
« Reply #17 on: March 07, 2010, 10:14:29 PM »

you know this is in the game make help thread right? the answer to this? I said it before..
Well, I'm not in the mood to flip through a dozen pages of a topic looking for one little piece of info, so I'll keep trying for now.  Besides, I got a good idea that might just work.

EDIT: IT WORKED!  I FIXED IT!!!

The problem wasn't with x's or y's or hitting the ceiling or distance fallen or yVel or anything.  The problem was that the fall timer was not accurately conveying how far and how fast the player was falling.  So I changed it!  Instead of starting in the moment the player begins falling, it starts ticking when the player begins falling at a certain speed.  Normally, the only requirements for the fall Timer to start counting are:

if (yVel > 0 and state != CLIMBING)

But if you increase the number of yVel to something higher, like:

if (yVel > 7 and state != CLIMBING)

The timer won't start until the player is falling at that speed.  Then, you go over to the fall damage requirements:

(platformCharacterIs(ON_GROUND) and fallTimer > 16 and not collision_rectangle(x-8, y-8, x+8, y+8, oSpringTrap, 0, 0))

And change the fallTimer requirement accordingly.  The player is spending less time in the air, so you lower the number by one less than the same amount you raised yVel by.

(platformCharacterIs(ON_GROUND) and fallTimer > 10 and not collision_rectangle(x-8, y-8, x+8, y+8, oSpringTrap, 0, 0))

This means the player will only take fall damage if they are definitely falling a great distance.  You need to change the higher-damage fall values as well:

if (fallTimer > 48) global.plife -= 10;
        else if (fallTimer > 32) global.plife -= 2;

to:

if (fallTimer > 42) global.plife -= 10;
        else if (fallTimer > 26) global.plife -= 2;

And you're done!  BOOM!  Glitch terminated.  Cool  Oh, but you'll also need to shorten the timer for the parachute's release.  But that's in the same area as the rest anyway.

EDIT EDIT: Well, I'll be.

It turns out Spikes also rely on your fall timer to register you connecting with them.  That's no big deal, though.  Just set the colSpikes event requirements from this:

(colSpikes and yVel > 0 and (fallTimer > 4 or stunned))

to this:

(colSpikes and yVel > 4)

I don't think there's any problem with that, but if one comes up, I'll mention it.
« Last Edit: March 08, 2010, 07:20:00 AM by halibabica » Logged

Sometimes I wonder if I like Spelunky too much.
ManTrap mod - Tastes Like Spelunky
Hand-drawn comic - Spelunkying
gummybears123
Mossy
*
Posts: 5776


Yummy Gummy!


View Profile
« Reply #18 on: March 08, 2010, 02:30:06 PM »

Don't you love it when  you find out what was wrong?  For me it was the {}
Logged

I made a rap.
It sounds dumb, like reading a map
I really should stop this thing before it goes too far
But I don't really car as long as I stay below the radar
Those big companies won't get me no
I'll get away before the fuzz show

-Most famous rapper of Mossmouth
Kirbylord
Pages: 1 [2]
  Print  
 
Jump to: