How do I stop an object from moving?

0 favourites
  • 7 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • I am making a breakout game,and need to stop the paddle when it touches walls,i thought this would be very simple,but i can't figure out how to do it...another thing,i can not use bound to layout,because layout is larger.So i need another solution.

  • You can add invisible wall on left and right side with solid behaviour or the wall you said set behaviour to solid

  • You can add invisible wall on left and right side with solid behaviour or the wall you said set behaviour to solid

    It is a solid....and the paddle still goes trough it.

  • Just use clamp()

    clamp(x, lower, upper)

    Return lower if x is less than lower, upper if x is greater than upper, else return x.

  • Just use clamp()

    clamp(x, lower, upper)

    Return lower if x is less than lower, upper if x is greater than upper, else return x.

    I don't know how to do that...i am beginner,do i do it in event sheet? If so,how?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Lets say you are controlling the paddle with the mouse and the furthest the paddle can go to the left without hitting the wall is 40 and the furthest right is 500,,,,,,,,

    make a condition and action as follows :

    System>everytick..........Paddle >set x to clamp(mousex,40,500)

  • Lets say you are controlling the paddle with the mouse and the furthest the paddle can go to the left without hitting the wall is 40 and the furthest right is 500,,,,,,,,

    make a condition and action as follows :

    System>everytick..........Paddle >set x to clamp(mousex,40,500)

    Thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)