Change direction when colliding with wall

Hello,
I'm having problems making my actor change direction when colliding with walls.
I have created an attribute called "movingright" and when set to 1 actor moves right and when 0 actor moves left.
I have also created two rules-
When movingright=1 and collide with wall change attribute movingright to 0
and
When movingright=0 and collide with wall change attribute movingright to 1
My actor begins by moving right and when it collides with the wall it changes direction and goes left as planned, but then when it collides with the wall on the other side it just continues to move left.
I have also tried to use different wall actors for left and right and this didn't work either. Am I missing something really simple?
Any help would be appreciated.
I'm having problems making my actor change direction when colliding with walls.
I have created an attribute called "movingright" and when set to 1 actor moves right and when 0 actor moves left.
I have also created two rules-
When movingright=1 and collide with wall change attribute movingright to 0
and
When movingright=0 and collide with wall change attribute movingright to 1
My actor begins by moving right and when it collides with the wall it changes direction and goes left as planned, but then when it collides with the wall on the other side it just continues to move left.
I have also tried to use different wall actors for left and right and this didn't work either. Am I missing something really simple?
Any help would be appreciated.
Comments
Is there any reason why the way I have tried to do it isn't working?
Can you explain what the above should be doing?
It also seems to be effecting my actor jumping, so now it accelerates straight up out of the scene.
Thanks for trying to help, any other suggestions would be greatly recieved!