The code is similar to Hello Engine. Quit copying Hello code.
What's this?
Code:
if keyboard_check_released(vk_shift) //Release the jump button to make the player fall while is moving up. (Variable jumping)
and canjump = 1
{
vspeed += 1.5 //Gives the appropiate speed to make the player fall.
canjump = 2 //Or jumpnow
}
Remember these in Hello Engine?
Code:
else if cj = 0 //Checks if the player landed on the floor and moves it more slower until it stops.
{
if hspeed > 0
hspeed -= 0.1
if hspeed < 0
hspeed += 0.1
if hspeed < 0.1
if hspeed > -0.1
hspeed = 0
}
Slopes are
still separate from solids just like in Hello Engine.
You said you were going to fix these but
It's the same thing as Hello Engine!Code:
//Bad code
if hspeed > 0 //If hspeed is larger than 0
if collision_rectangle(bbox_right,bbox_top+4,bbox_right+1+hspeed,bbox_bottom-1,obj_solid,1,0) //If there is a wall at the right of the player.
hspeed = 0 //Stop him inmediately.
if hspeed < 0 //If hspeed is smaller than 0
if collision_rectangle(bbox_left-1+hspeed,bbox_top+4,bbox_left,bbox_bottom-1,obj_solid,1,0) //If there is a wall at the left of the player.
hspeed = 0 //Stop him inmediately.
Code:
//Let's make the player move up when is on a slope.
while collision_rectangle(bbox_left,bbox_top,bbox_right,bbox_bottom,obj_parslope,1,0)
y -= 1 //Move the player up.
Code:
if place_meeting(x,y-8,obj_parplayer)
{
if obj_parplayer.hspeed < 0
obj_parplayer.y +=abs(obj_parplayer.hspeed)
}
I would start all over if I were you. What you did is copy and paste code, remove lines, changed variables, and fixed it but it's still terrible.
The code is similar to Hello Engine. Quit copying Hello code.
What's this?
[code]
if keyboard_check_released(vk_shift) //Release the jump button to make the player fall while is moving up. (Variable jumping)
and canjump = 1
{
vspeed += 1.5 //Gives the appropiate speed to make the player fall.
canjump = 2 //Or jumpnow
}
[/code]
Remember these in Hello Engine?
[code]
else if cj = 0 //Checks if the player landed on the floor and moves it more slower until it stops.
{
if hspeed > 0
hspeed -= 0.1
if hspeed < 0
hspeed += 0.1
if hspeed < 0.1
if hspeed > -0.1
hspeed = 0
}
[/code]
Slopes are [b]still[/b] separate from solids just like in Hello Engine.
You said you were going to fix these but
[size=150]It's the same thing as Hello Engine![/size]
[code]
//Bad code
if hspeed > 0 //If hspeed is larger than 0
if collision_rectangle(bbox_right,bbox_top+4,bbox_right+1+hspeed,bbox_bottom-1,obj_solid,1,0) //If there is a wall at the right of the player.
hspeed = 0 //Stop him inmediately.
if hspeed < 0 //If hspeed is smaller than 0
if collision_rectangle(bbox_left-1+hspeed,bbox_top+4,bbox_left,bbox_bottom-1,obj_solid,1,0) //If there is a wall at the left of the player.
hspeed = 0 //Stop him inmediately.
[/code]
[code]
//Let's make the player move up when is on a slope.
while collision_rectangle(bbox_left,bbox_top,bbox_right,bbox_bottom,obj_parslope,1,0)
y -= 1 //Move the player up.
[/code]
[code]
if place_meeting(x,y-8,obj_parplayer)
{
if obj_parplayer.hspeed < 0
obj_parplayer.y +=abs(obj_parplayer.hspeed)
}
[/code]
I would start all over if I were you. What you did is copy and paste code, remove lines, changed variables, and fixed it but it's still terrible.