I
Iniciante
Guest
Okay, I'll be straight, I'm already so stressed out. I wanted that when the enemy was walking and when it collided with a wall it would look in the opposite direction and walk until reaching another wall and repeat the process, (like a turtle in Mario for example) for the movement of the enemy is all working more the animation does not work, it only gets a solid sprite, but the impressive one (and also what's making me a little angry) is the fact that the variables and code I used for animation are not working even though I have used those same variables and codes in a prototype and worked perfectly
In the create besides the variables of hp, speed and etc have these two that are for the animation:
xPrevious = x;
yPrevious = y;
in step again has the two variables:
xPrevious = x;
yPrevious = y;
And in the end step I put this code:
if x > xPrevious{
sprite_index = spr_olho;
image_speed = 0.4;
}else if x < xPrevious{
sprite_index = spr_olho2;
image_speed = 0.4;
}
How do I solve this? (sorry my bad english)
In the create besides the variables of hp, speed and etc have these two that are for the animation:
xPrevious = x;
yPrevious = y;
in step again has the two variables:
xPrevious = x;
yPrevious = y;
And in the end step I put this code:
if x > xPrevious{
sprite_index = spr_olho;
image_speed = 0.4;
}else if x < xPrevious{
sprite_index = spr_olho2;
image_speed = 0.4;
}
How do I solve this? (sorry my bad english)