alguem me ajuda
Enviado: Sex Jul 29, 2022 8:06 pm
Alguém ai sabe o porque de o meu personagem não pular?
// ANDAR
move = -keyboard_check(vk_left) + keyboard_check(vk_right)
hsp = move * spd
//COLISAO
if place_meeting(x + hsp, y, obj_block)
{
while !place_meeting(x + sign(hsp), y, obj_block)
{
x += sign(hsp)
}
hsp = 0
}
x += hsp
if place_meeting(x, y + vsp, obj_block)
{
while !place_meeting(x, y + sign(vsp), obj_block)
{
y += sign(vsp)
}
vsp = 0
}
y += vsp
//PULO
if place_meeting(x, y + 1, obj_block)
{
vsp = jspd
}
// ANDAR
move = -keyboard_check(vk_left) + keyboard_check(vk_right)
hsp = move * spd
//COLISAO
if place_meeting(x + hsp, y, obj_block)
{
while !place_meeting(x + sign(hsp), y, obj_block)
{
x += sign(hsp)
}
hsp = 0
}
x += hsp
if place_meeting(x, y + vsp, obj_block)
{
while !place_meeting(x, y + sign(vsp), obj_block)
{
y += sign(vsp)
}
vsp = 0
}
y += vsp
//PULO
if place_meeting(x, y + 1, obj_block)
{
vsp = jspd
}