i messed around with it and made some new code:
I found these 2 lines in my program which are used to set the players direction:
if speed_diff < 0 then --lines 62 and 64 set the acceleration to work in the direction of the difference
acceleration.x = -move_acceleration
else
acceleration.x = move_acceleration
end
so i added the lines:
if speed_diff < 0 then --lines 62 and 64 set the acceleration to work in the direction of the difference
acceleration.x = -move_acceleration
self.direction = -1
else
acceleration.x = move_acceleration
self.direction = 1
end
at the end of the update function i wrote:
if self.direction == -1 then
sprite.set_hflip("player#collisiobobject",true)
end
But this also didn’t do anything for some reason.
(I did find the error in the URL of the collision, atleast thats where i thought it was lmao
)