@Janette5 ah ok lol thank you for that. but how would i fix this? for some reason i get stuck when i collide with either of the walls.
Just reset the flags when the player is not overlapping the spike walls.
* NOT player is overlapping spike_wall1
player : Set Flag 2 off
* NOT player is overlapping spike_wall2
player : Set Flag 3 off
@Janette5 uh i do have one more question to ask. so when the player collides against one of the spike walls they get kinda stuck on them. it isnt like the last time, this time you can detach yourself pretty easily but what do i do to prevent it? i think maybe if i bring the walls back it may fix it but im not too sure. to make it happen just run towards one of the walls, and to detach yourself just wiggle a but and you come loose. Application 6.mfa
The way it's written is if the player touches the wall then the wall pushes them. If they move left or right they're still touching the wall and the wall will push them in the direction the wall is going.
If they move away from the wall - and there is space - they can again freely move - but they need to do that faster than what the wall is moving in order to break the collision.
If you don't do this - then the wall won't push them but move over them.
There's two things you can try - I put them into the game - the one is to reset the flag when the wall changes direction - lines 71 + 77.
The other is to only have the all push the player when it is moving in a specific direction - so when the wall is retreating the collision is reset and doesn't trigger. I changed lines 69 + 75 to test the direction.
See if these solve your problem.
You should leave both - they work together.
ah ok thanks