Código: Selecionar todos
if distance_to_object(obj_rampa)<=1 && key_left {x-=2;y-=4}
if distance_to_object(obj_rampa2)<=1 && key_right {x+=2;y-=4}
Código: Selecionar todos
if lado == 0
{
if xspeed > 0 && ataque = 0
{
sprite_index = spr_player_anda_d;
image_speed = 0.3;
}
if xspeed == 0 && ataque = 0
{
sprite_index = spr_player_parado_d;
}
if !place_meeting(x,y+1,obj_wall)
{
if yspeed < 0 && ataque = 0
{
sprite_index = spr_player_pulo_d;
image_speed = 1;
}
if yspeed > 0 && ataque = 0
{
sprite_index = spr_player_pulo_d;
image_speed = 1;
}
if yspeed == 0 && ataque = 0
{
sprite_index = spr_player_pulo_d;
image_speed = 1;
}
}
if ataque = 1 {
sprite_index = spr_player_ataque_d;
image_speed = 0.7;
if (image_index>=3 && image_index<4)
{
ataque=0;
}
}
}
//Left Animation
if lado == 1
{
if xspeed < 0 && ataque = 0
{
sprite_index = spr_player_anda_e;
image_speed = 0.3;
}
if xspeed == 0 && ataque = 0
{
sprite_index = spr_player_parado_e;
}
if !place_meeting(x,y+1,obj_wall)
{
if yspeed < 0 && ataque = 0
{
sprite_index = spr_player_pulo_e;
image_speed = 1;
}
if yspeed == 0 && ataque = 0
{
sprite_index = spr_player_pulo_e;
image_speed = 1;
}
if yspeed > 0 && ataque = 0
{
sprite_index = spr_player_pulo_e;
image_speed = 1;
}
}
if ataque = 2 {
sprite_index = spr_player_ataque_e;
image_speed = 0.7;
if (image_index>=3 && image_index<4)
{
ataque=0;
}
}
}