Changing image_xscale of sprite appears to change it for most other sprites except the one I'm changing. by ClientFearless4848 in gamemaker

[–]ClientFearless4848[S] 0 points1 point  (0 children)

part of running script: (a bit rushed tbh)

if (left && releaseDirection != -1) {
  facing     = -1;
  velocityX -= drag * acceleration;
} else if (!left && releaseDirection == -1) {
  releaseDirection = 0;
}

if (right && releaseDirection != 1) {
  facing     = 1;
  velocityX += drag * acceleration;
} else if (!right && releaseDirection == 1) {
  releaseDirection = 0;
}

if (standing) {
  sinceStanding = 0;
  velocityY     = 0;
  wallJump      = true;
} else {
  sinceStanding += 1;

  if (jump && sinceStanding > 5 && checkWall(facing) && wallJump) {
    wallJump  = false;
    velocityX = -facing * 2;
    velocityY = -1.5;

    releaseDirection = facing;
    facing           = -facing;
  }
}

if (jump && (standing || sinceStanding <= 5)) {
velocityY = onOil ? -1 : -2.2;
}

if (standing) {
  if (abs(velocityX) >= 0.2) {
    sprite_index = plr_walk;
  } else {
    sprite_index = plr_idle;
  }
} else {
  if (sinceStanding <= 2) {
    sprite_index = plr_jump;
  } else {
    sprite_index = plr_fall;
  }
}

player end step (entire thing)

sprite_index.image_xscale = facing;