ACTOR AND GAME BORDERS

Ok, I've been searching for the past 8 hours how to do this,but I just can't find a complete answer.
What I want is to create a border (located in the upper screen) so that the actors won't go there(I want to use the space for score and health).So,Actor goes up,actor stops (holds still) when reaching barrier..
Any help please?
What I want is to create a border (located in the upper screen) so that the actors won't go there(I want to use the space for score and health).So,Actor goes up,actor stops (holds still) when reaching barrier..
Any help please?
Comments
1) in your actor make a rule ,
when "self.position.y" > 280 (or any other value)
constrain "self.position.y" to 280.
this way your actor will not go upper than this .
2) make a new actor "wall" , uncheck movable and visible and set its restitution to 0.
place it where you want your barrier .
in your moving actor make a rule :
collide with actor wall .
done!
Roy.
First of all the 2nd solution doesn't work at all. I tried it before,I tried it again now and the actor just goes through it like it isn't there.
Second of all the other solution(first) doesn't work either (same results,actor doesn't see the border)
Maybe it gets messed up because the actor movement is with the mouse?
I already have self.position.x=mouse.position.x (I care about mouse position x and not y because it is a vertical scrolling game)
any help please?
This is what happens when you are on a problem 7 hours straight...I got y and x axis reversed!!
Got it,thanks !!!