Noviembre 20, 2010, 09:14:51 PM Ultima modificación: Noviembre 20, 2010, 10:40:17 PM por ZELDA
hola amigos quisiera saber como hacer que cuando termine el salto de mi mono y vaya callendo cambie el sprite  y cuando no tenga un objeto solido debajo de el tenga la animacion de cuando se cae el codigo del salto es este if not place_free(x+0,y+1)
vspeed=-7
if global.direccion=1
    {
    sprite_index=spr_mono_jumpR;
    }
if global.direccion=0
    {
    sprite_index=spr_mono_jumpL;
    }

gracias de antemano

#1 Noviembre 20, 2010, 09:37:46 PM Ultima modificación: Noviembre 20, 2010, 09:39:41 PM por DEADOFALL
Te doy unos c?digos para cambio de sprites de tu personaje en donde viene incluido eso que pides ;)
En el evento Step:
[gml]if (vspeed < 0)
{
 if (left == true) { sprite_index = saltandoizq; }
 if (right == true) { sprite_index = saltandoder; }
}
if (vspeed > 0)
{
 if (left == true) { sprite_index = cayendoizq; }
 if (right == true) { sprite_index = cayendoder; }
}
if (!place_free(x,y+1))
{
 if (left == true) { sprite_index = caminandoizq; }
 if (right == true) { sprite_index = caminandoder; }
}
if (left == true && !keyboard_check(vk_left) && !place_free(x,y+1))
{ sprite_index = detenidoizq; }
if (right == true && !keyboard_check(vk_right) && !place_free(x,y+1))
{ sprite_index = detenidoder; }[/gml]
En Create:
[gml]left = false;
right = true;[/gml]
En Right:
[gml]left = false; right = true;[/gml]
Y en Left:
[gml]left = true; right = false;[/gml]
As? conseguir?s un buen cambio de sprites (incluyendo el de la ca?da) ?Suerte! ;)


Claro, de nada :) ?Suerte con tu proyecto! ;)

muchas gracias!!! oye no sabes como hacer que camine en terreno inclinado???
saludos