Yes for the playersorry, i was under the assumption you knew what your current code does. You DO have a working gravity system in your platform game, correct?
- Game Maker Community
- → Viewing Profile: Posts: ThatOneGuyX
ThatOneGuyX
Member Since 21 Dec 2011Offline Last Active Apr 10 2012 06:49 AM
Community Stats
- Group New Member
- Active Posts 66
- Profile Views 916
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
-
Version
GM8
Posts I've Made
In Topic: Lose Hearts by falling
10 April 2012 - 03:20 AM
In Topic: Lose Hearts by falling
09 April 2012 - 10:13 PM
Im guessing you put this in step event and by the way place_meet is an unknown code it dose to work with game makerlanguage 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
}
In Topic: Lose Hearts by falling
09 April 2012 - 08:10 AM
Ok but were am i supposed to put that and yes i understand that's how minecraft does it but minecraft is written in javathis 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.
In Topic: Lose Hearts by falling
09 April 2012 - 12:52 AM
In Topic: Block Based water physics
08 April 2012 - 08:44 AM
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
- Game Maker Community
- → Viewing Profile: Posts: ThatOneGuyX
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content