M
MUSTAFA SALAH
Guest
hey guys i have a problem i can't get the attack sprite reset to image 0 when attacking =true
it works by adding ;
else
{
if image_index != 0
{
image_index = 0;
}
}
but the other sprites stayed in image 0
my code ;
it works by adding ;
else
{
if image_index != 0
{
image_index = 0;
}
}
but the other sprites stayed in image 0
my code ;
Code:
// condition 0 (not Armed)
image_speed = 0.3;
if (condition == 0)
{
if (grounded)
{
if state = adle
{
image_speed=0.3;
sprite_index = sp_adle;
}
if state = run
{
sprite_index = sp_run
}
}
}
// condition 1 (Armed-sowrd)
if (condition == 1)
{
if (grounded)
{
if state = adle
{
sprite_index=sp_adlesowrd;
}
if state = run
{
sprite_index = sp_runsowrd;
}
}
if canattack = true
{
sprite_index = sp_playersowrd_attack
} else
{
if image_index != 0
{
image_index = 0;
}
}
}