# ThatOneGuyX

Member Since 21 Dec 2011
Offline Last Active Apr 10 2012 06:49 AM

### In Topic: Lose Hearts by falling

10 April 2012 - 03:20 AM

sorry, i was under the assumption you knew what your current code does. You DO have a working gravity system in your platform game, correct?

Yes for the player

### In Topic: Lose Hearts by falling

09 April 2012 - 10:13 PM

language means nothing.

i have not much coding experience with platformers, but in theory, your using place_meet or a function like that to see if the player lands on the ground.
lets just for example the below code (the place_meat is basicly, this is a example extending your gravity stop code)

if( place_meet(x,y-16) = true)
{//this is start of block
gravity = 0; //stop gravity
dif = last_y - y; //different in levels
if last_y > y and dif > 32 //if the last gound usage is BELOW (meaning a fall) AND difference is enough to take damage (32 pixels)
{//start of block
health -= (dif-32)/32; //every 32 pixels = 1 health damage, tinker with values to check it. 32 pixels is a safe non-hurt
}
last_y = y; //now set our ground_level
}

Im guessing you put this in step event and by the way place_meet is an unknown code it dose to work with game maker

### In Topic: Lose Hearts by falling

09 April 2012 - 08:10 AM

this is how minecraft deals with it:

when your on the ground. Last_On =  Z (or Y)
then next time you land. check if Now_On < Last_On. then check if the gap is big enough to deal damage.

Ok but were am i supposed to put that and yes i understand that's how minecraft does it but minecraft is written in java

### In Topic: Lose Hearts by falling

09 April 2012 - 12:52 AM

I have a idea on how im going to do this when the player is no longer on the object ground it starts the timer if the player is in the air for 3 seconds when he hits the ground he lose 1 health if its 4 seconds he lose 2 health once hes in contact with the ground again i just need some help doing this

### In Topic: Block Based water physics

08 April 2012 - 08:44 AM

Yes i just have 1 more prob the water is set as solid and that's good im keeping it that way stops it from lagging but
the gravity when you are in the water object is much different to the air out side of the water how do i fix this