How do I make an object that I can control not move when another object collides with it?

sSHAKESssSHAKESs Member Posts: 27
edited October 2012 in Working with GS (Mac)
Hello, GameSalad peeps!!! =D

I'm new here and getting so excited! I've been playing around with the program and trying to make a simple Pong game. And I've tried searching the forums and doing all kinds of settings but I still can't solve this problem.

Basically, when the ball hits my paddle, the paddle flies around! It's funny to look at but it's not what I want. =(

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You have a couple options. First is the easiest for not moving the paddle on the X axis but then you will most likely have to rework how you are moving the paddle now. That would be uncheck moveable in your actors attributes. You could then use something like Change attribute for the y axis and a timer to move the paddle up and down. it might not be very smooth though.

    Next you can use the Constrain Attribute in your paddle and constrain it to the X position you want to use. this will most likely work with your current movement system. You just want to be careful with how much you use the constrain behavior as it can pull down the performance of your game if you use to many. just a couple in the scene though is not going to hurt anything.
  • sSHAKESssSHAKESs Member Posts: 27
    Hello, Sir! Thanks for the speedy reply... I really have no idea how to properly use the constrain attribute. That's how much of a newbie I am. :(

  • sSHAKESssSHAKESs Member Posts: 27
    Hello, again! I found a tutorial online about constraining the paddle on the y-axis like you said. That works now... but the problem is, if the paddle is 'movable,' the ball just goes through it... even with the collide attribute. So weird!!!
Sign In or Register to comment.