actor stop movement in the end of the screen

BaherJaberiBaherJaberi Member Posts: 30
edited November -1 in Working with GS (Mac)
Hey mates..
am new here in game salad.. am working on a game and i face a small problem.
my actor goin left and right.. its working perfect. but i want to my actor to stop when it reach end of the screen..
who can help me to do that.

am using accelerate and move to go left and right..

waiting for suggestions..

regards.
Beejay

Comments

  • design219design219 Member Posts: 2,273
    The simplest way is to make invisible walls. Make a wall actor with "collide" setting on the wall and your main actor so they cannot overlap. Then, put instances of the wall actor around the the edges of your scene (or 4 if you need to contain up and down as well). You can set them to be very thin ( I usually keep them 10 pixels wide so I can grab them if I need to) and as tall as the sides of your scene.

    As a last step, when you have them in place and working as needed, set their visibility setting to unchecked.

    ___________________

    HAPPY NOSE JOB!: Nesen Probe: is on the App Store. If anyone want's to try it out, codes are still available near the end of this thread: http://gamesalad.com/forums/topic.php?id=8097
  • BaherJaberiBaherJaberi Member Posts: 30
    first of all thanks for responding..
    i tried to put colide behav on the wall but the wall still moving and also my main actor who goin left and writing are bouncing when he touch the wall...do i need change any sitting ? or if u know any sample project code i can download it and check it.?
  • BaherJaberiBaherJaberi Member Posts: 30
    i dont want my min actor to bounce back when it reach the wall.. i just wanted to stop.. its like end of the screen.. any suggestion
Sign In or Register to comment.