B
BladeGamez
Guest
So I started making the sprite animations for the walking today and decided to code the actual animations in. When trying this out, everything worked except the character seemed to become a bit wider. Now it can't react to collisions as usual due to its size. The code is below
/// Switching Between animations
if (yprevious != y) {
sprite_index = robo1;
image_speed = 0;
image_index = y > yprevious;
} else {
if (xprevious != x) {
sprite_index = robo1walk;
image_speed = .3;
} else {
sprite_index = robo1;
}
}
/// Directional Animation Switch
if (xprevious < x) {
image_xscale = 1;
} else if (xprevious > x) {
image_xscale = -1;
}
Do you see any problem in the coding or would it be in the mask?
/// Switching Between animations
if (yprevious != y) {
sprite_index = robo1;
image_speed = 0;
image_index = y > yprevious;
} else {
if (xprevious != x) {
sprite_index = robo1walk;
image_speed = .3;
} else {
sprite_index = robo1;
}
}
/// Directional Animation Switch
if (xprevious < x) {
image_xscale = 1;
} else if (xprevious > x) {
image_xscale = -1;
}
Do you see any problem in the coding or would it be in the mask?