This repository has been archived on 2025-03-19. You can view files and clone it, but cannot push or open issues or pull requests.
Blobledoodes/objects/obj_bloblehop_player/Step_0.gml
rgrzanic 4702e9c906 clouds added, code simplified, bug fixed?
bug possibly fixed where the blobleshoot flys through
2019-07-25 16:27:12 -06:00

39 lines
No EOL
612 B
Text

if vsp < maxvsp
{
vsp = (vsp + grav)
}
if (place_meeting(x+1+hsp,y,obj_bloblehop_wall)) || (place_meeting(x-1+hsp,y,obj_bloblehop_wall)) hsp = -hsp
if hsp > maxhsp or hsp < -maxhsp
{
hsp = (sign(hsp)* maxhsp)
}
x += hsp
if vsp >0
{
if (place_meeting(x,y+1,obj_bloblehop_platform)) || (place_meeting(x,y-1,obj_bloblehop_platform)){ vsp = -jumpspeed}
}
if vsp >0
{
if (place_meeting(x,y+1,obj_bloblehop_platformboost)) || (place_meeting(x,y-1,obj_bloblehop_platformboost)){ vsp = -boostjumpspeed}
}
y += vsp
if y > (camera_get_view_y(view_camera[0]) + 1800)
{
room_goto(rm_Gameover)
}